You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2006/03/24 08:50:06 UTC

svn commit: r388441 [2/2] - in /xmlgraphics/batik/trunk: ./ lib/ resources/META-INF/services/ resources/org/apache/batik/apps/svgbrowser/resources/ resources/org/apache/batik/apps/svgpp/resources/ sources/org/apache/batik/apps/svgbrowser/ sources/org/a...

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/RhinoInterpreter.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/RhinoInterpreter.java?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/RhinoInterpreter.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/RhinoInterpreter.java Thu Mar 23 23:50:03 2006
@@ -1,6 +1,6 @@
 /*
 
-   Copyright 2001-2004  The Apache Software Foundation 
+   Copyright 2001-2004,2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -37,6 +37,10 @@
 import org.apache.batik.script.InterpreterException;
 import org.apache.batik.script.Window;
 import org.mozilla.javascript.Context;
+import org.mozilla.javascript.ContextAction;
+import org.mozilla.javascript.ContextFactory;
+import org.mozilla.javascript.ClassCache;
+import org.mozilla.javascript.ClassShutter;
 import org.mozilla.javascript.Function;
 import org.mozilla.javascript.JavaScriptException;
 import org.mozilla.javascript.NativeJavaPackage;
@@ -55,7 +59,11 @@
  * @version $Id$
  */
 public class RhinoInterpreter implements Interpreter {
-    private static String[] TO_BE_IMPORTED = {
+
+    /**
+     * Java packages that will be imported into the scripting environment.
+     */
+    protected static String[] TO_BE_IMPORTED = {
         "java.lang",
         "org.w3c.dom",
         "org.w3c.dom.css",
@@ -67,42 +75,50 @@
     };
 
     /**
-     * The window object
+     * The number of cached compiled scripts to store.
      */
-    protected Window window;
+    private static final int MAX_CACHED_SCRIPTS = 32;
 
-    public Window getWindow() {
-        return window;
-    }
+    /**
+     * Constant used to describe an SVG source
+     */
+    public static final String SOURCE_NAME_SVG = "<SVG>";
 
+    /**
+     * Name of the "window" object when referenced by scripts
+     */
+    public static final String BIND_NAME_WINDOW = "window";
 
-    private static class Entry {
-        String str;
-        Script script;
-        Entry(String str, Script script) {
-            this.str = str;
-            this.script = script;
-        }
-    }
+    /**
+     * Context vector, to make sure we are not
+     * setting the security context too many times
+     */
+    protected static List contexts = new LinkedList();
 
     /**
-     * store last 32 precompiled objects.
+     * The window object.
      */
-    private static final int MAX_CACHED_SCRIPTS = 32;
+    protected Window window;
 
     /**
-     * Constant used to describe an SVG source
+     * The global object.
      */
-    public static final String SOURCE_NAME_SVG = "<SVG>";
+    protected ScriptableObject globalObject = null;
 
     /**
-     * Name of the "window" object when referenced by scripts
+     * List of cached compiled scripts.
      */
-    public static final String BIND_NAME_WINDOW = "window";
+    protected LinkedList compiledScripts = new LinkedList();
 
-    private ScriptableObject globalObject = null;
-    private LinkedList compiledScripts = new LinkedList();
-    private WrapFactory wrapFactory = new BatikWrapFactory(this);
+    /**
+     * Factory for Java wrapper objects.
+     */
+    protected WrapFactory wrapFactory = new BatikWrapFactory(this);
+
+    /**
+     * Class shutter.
+     */
+    protected ClassShutter classShutter = new RhinoClassShutter();
 
     /**
      * The Rhino 'security domain'. We use the RhinoClassLoader
@@ -116,20 +132,19 @@
      * which ensures scripts have access to the
      * server they were downloaded from
      */
-    private SecurityController securityController
+    protected SecurityController securityController
         = new BatikSecurityController();
 
     /**
-     * Default Context for scripts. This is used only for efficiency
-     * reason.
+     * Factory object for creating Contexts.
      */
-    protected Context defaultContext;
+    protected ContextFactory contextFactory = new Factory();
 
     /**
-     * Context vector, to make sure we are not
-     * setting the security context too many times
+     * Default Context for scripts. This is used only for efficiency
+     * reasons.
      */
-    protected static List contexts = new LinkedList();
+    protected Context defaultContext;
 
     /**
      * Build a <code>Interpreter</code> for ECMAScript using Rhino.
@@ -146,30 +161,41 @@
         } catch (SecurityException se) {
             rhinoClassLoader = null;
         }
-        // entering a context
-        Context ctx = enterContext();
-        try {
-            Scriptable scriptable = ctx.initStandardObjects(null, false);
-            defineGlobalWrapperClass(scriptable);
-            // we now have the window object as the global object from the
-            // launch of the interpreter.
-            // 1. it works around a Rhino bug introduced in 15R4 (but fixed
-            // by a later patch).
-            // 2. it sounds cleaner.
-            globalObject = createGlobalObject(ctx);
-            // import Java lang package & DOM Level 2 & SVG DOM packages
-            NativeJavaPackage[] p = new NativeJavaPackage[TO_BE_IMPORTED.length];
-            for (int i = 0; i < TO_BE_IMPORTED.length; i++) {
-                p[i] = new NativeJavaPackage(TO_BE_IMPORTED[i], rhinoClassLoader);
-            } try {
-                ScriptableObject.callMethod(globalObject, "importPackage", p);
-            } catch (JavaScriptException e) {
-              // cannot happen as we know the method is there and
-              // the parameters are ok
+        ContextAction initAction = new ContextAction() {
+            public Object run(Context cx) {
+                Scriptable scriptable = cx.initStandardObjects(null, false);
+                defineGlobalWrapperClass(scriptable);
+                globalObject = createGlobalObject(cx);
+                ClassCache cache = ClassCache.get(globalObject);
+                cache.setCachingEnabled(rhinoClassLoader != null);
+                // import Java lang package & DOM Level 2 & SVG DOM packages
+                StringBuffer sb = new StringBuffer("importPackage(Packages.");
+                for (int i = 0; i < TO_BE_IMPORTED.length - 1; i++) {
+                    sb.append(TO_BE_IMPORTED[i]);
+                    sb.append(");importPackage(Packages.");
+                }
+                sb.append(TO_BE_IMPORTED[TO_BE_IMPORTED.length - 1]);
+                sb.append(')');
+                cx.evaluateString(globalObject, sb.toString(), null, 0,
+                                  rhinoClassLoader);
+                return null;
             }
-        } finally {
-            Context.exit();
-        }
+        };
+        contextFactory.call(initAction);
+    }
+
+    /**
+     * Returns the window object for this interpreter.
+     */
+    public Window getWindow() {
+        return window;
+    }
+
+    /**
+     * Returns the ContextFactory for this interpreter.
+     */
+    public ContextFactory getContextFactory() {
+        return contextFactory;
     }
 
     /**
@@ -194,48 +220,11 @@
      * Returns the AccessControlContext associated with this Interpreter.
      * @see org.apache.batik.script.rhino.RhinoClassLoader
      */
-    public AccessControlContext getAccessControlContext(){
+    public AccessControlContext getAccessControlContext() {
         return rhinoClassLoader.getAccessControlContext();
     }
 
     /**
-     * Implementation helper. Makes sure the proper security is set
-     * on the context.
-     */
-    public Context enterContext(){
-        Context ctx = Context.enter();
-        if (ctx == defaultContext)
-            return ctx;
-
-        boolean found = false;
-        Iterator i = contexts.iterator();
-        while (i.hasNext()) {
-            WeakReference ref = (WeakReference) i.next();
-            Object context = ref.get();
-            if (context == null) {
-                i.remove();
-            } else if (context == ctx) {
-                found = true;
-                break;
-            }
-        }
-        if (!found) {
-            ctx.setWrapFactory(wrapFactory);
-            ctx.setSecurityController(securityController);
-            ctx.setClassShutter(new RhinoClassShutter());
-
-            // No class loader so don't try and optmize.
-            if (rhinoClassLoader == null) {
-                ctx.setOptimizationLevel(-1);
-                Context.setCachingEnabled(false);
-            }
-            contexts.add(new WeakReference(ctx));
-        }
-        defaultContext = ctx;
-        return ctx;
-    }
-
-    /**
      * This method returns the ECMAScript global object used by this
      * interpreter.
      */
@@ -251,56 +240,53 @@
      * @return if no exception is thrown during the call, should return the
      * value of the last expression evaluated in the script.
      */
-    public Object evaluate(Reader scriptreader)
-        throws InterpreterException, IOException {
+    public Object evaluate(Reader scriptreader) throws IOException {
         return evaluate(scriptreader, SOURCE_NAME_SVG);
     }
 
     /**
      * This method evaluates a piece of ECMAScript.
-     * @param scriptreader a <code>java.io.Reader</code> on the piece of script
+     * @param scriptReader a <code>java.io.Reader</code> on the piece of script
      * @param description description which can be later used (e.g., for error
      *        messages).
      * @return if no exception is thrown during the call, should return the
      * value of the last expression evaluated in the script.
      */
-    public Object evaluate(Reader scriptreader, String description)
-        throws InterpreterException, IOException {
+    public Object evaluate(final Reader scriptReader, final String description)
+        throws IOException {
 
-        Object rv = null;
-        final Context ctx = enterContext();
+        ContextAction evaluateAction = new ContextAction() {
+            public Object run(Context cx) {
+                try {
+                    return cx.evaluateReader(globalObject,
+                                             scriptReader,
+                                             description,
+                                             1, rhinoClassLoader);
+                } catch (IOException ioe) {
+                    throw new WrappedException(ioe);
+                }
+            }
+        };
         try {
-            rv = ctx.evaluateReader(globalObject,
-                                    scriptreader,
-                                    description,
-                                    1, rhinoClassLoader);
+            return contextFactory.call(evaluateAction);
         } catch (JavaScriptException e) {
             // exception from JavaScript (possibly wrapping a Java Ex)
-            if (e.getValue() instanceof Exception) {
-                Exception ex = (Exception)e.getValue();
-                throw new InterpreterException(ex, ex.getMessage(), -1, -1);
-            } else
-                throw new InterpreterException(e, e.getMessage(), -1, -1);
+            Object value = e.getValue();
+            Exception ex = value instanceof Exception ? (Exception) value : e;
+            throw new InterpreterException(ex, ex.getMessage(), -1, -1);
         } catch (WrappedException we) {
-            // main Rhino RuntimeException
             Throwable w = we.getWrappedException();
-            if (w instanceof Exception)
-                throw
-                    new InterpreterException((Exception)we.getWrappedException(),
-                                             we.getWrappedException().getMessage(),
-                                             -1, -1);
-            else
-                throw new InterpreterException(we.getWrappedException().getMessage(), -1, -1);
+            if (w instanceof Exception) {
+                throw new InterpreterException
+                    ((Exception) w, w.getMessage(), -1, -1);
+            } else {
+                throw new InterpreterException(w.getMessage(), -1, -1);
+            }
         } catch (InterruptedBridgeException ibe) {
-            // This sometimes happens when script builds stuff.
             throw ibe;
-        }  catch (RuntimeException re) {
-            // other RuntimeExceptions
+        } catch (RuntimeException re) {
             throw new InterpreterException(re, re.getMessage(), -1, -1);
-        } finally {
-            Context.exit();
         }
-        return rv;
     }
 
     /**
@@ -308,90 +294,86 @@
      * The first time a String is passed, it is compiled and evaluated.
      * At next call, the piece of script will only be evaluated to
      * prevent from recompiling it.
-     * @param scriptstr the piece of script
+     * @param scriptStr the piece of script
      * @return if no exception is thrown during the call, should return the
      * value of the last expression evaluated in the script.
      */
-    public Object evaluate(final String scriptstr)
-        throws InterpreterException {
-        Object rv = null;
-        final Context ctx = enterContext();
-        try {
-            Script script = null;
-            Entry et = null;
-            Iterator it = compiledScripts.iterator();
-            // between nlog(n) and log(n) because it is
-            // an AbstractSequentialList
-            while (it.hasNext()) {
-                if ((et = (Entry)(it.next())).str.equals(scriptstr)) {
-                    // if it is not at the end, remove it because
-                    // it will change from place (it is faster
-                    // to remove it now)
-                    script = et.script;
-                    it.remove();
-                    break;
+    public Object evaluate(final String scriptStr) {
+
+        ContextAction evalAction = new ContextAction() {
+            public Object run(final Context cx) {
+                Script script = null;
+                Entry entry = null;
+                Iterator it = compiledScripts.iterator();
+                // between nlog(n) and log(n) because it is
+                // an AbstractSequentialList
+                while (it.hasNext()) {
+                    if ((entry = (Entry) it.next()).str.equals(scriptStr)) {
+                        // if it is not at the end, remove it because
+                        // it will change from place (it is faster
+                        // to remove it now)
+                        script = entry.script;
+                        it.remove();
+                        break;
+                    }
                 }
-            }
 
-            if (script == null) {
-                // this script has not been compiled yet or has been forgotten
-                // since the compilation:
-                // compile it and store it for future use.
-
-                script = (Script)AccessController.doPrivileged
-                    (new PrivilegedAction() {
-                            public Object run() {
-                                try {
-                                    return ctx.compileReader
-                                        (globalObject,
-                                         new StringReader(scriptstr),
-                                         SOURCE_NAME_SVG,
-                                         1, rhinoClassLoader);
-                                } catch (IOException io) {
-                                    // Should never happen: using a string
-                                    throw new Error();
-                                }
+                if (script == null) {
+                    // this script has not been compiled yet or has been
+                    // forgotten since the compilation:
+                    // compile it and store it for future use.
+
+                    PrivilegedAction compile = new PrivilegedAction() {
+                        public Object run() {
+                            try {
+                                return cx.compileReader
+                                    (new StringReader(scriptStr),
+                                     SOURCE_NAME_SVG, 1, rhinoClassLoader);
+                            } catch (IOException ie) {
+                                // Should never happen: using a string
+                                throw new Error();
                             }
-                        });
-
-                if (compiledScripts.size()+1 > MAX_CACHED_SCRIPTS) {
-                    // too many cached items - we should delete the
-                    // oldest entry.  all of this is very fast on
-                    // linkedlist
-                    compiledScripts.removeFirst();
+                        }
+                    };
+                    script = (Script)AccessController.doPrivileged(compile);
+
+                    if (compiledScripts.size() + 1 > MAX_CACHED_SCRIPTS) {
+                        // too many cached items - we should delete the
+                        // oldest entry.  all of this is very fast on
+                        // linkedlist
+                        compiledScripts.removeFirst();
+                    }
+                    // storing is done here:
+                    compiledScripts.addLast(new Entry(scriptStr, script));
+                } else {
+                    // this script has been compiled before,
+                    // just update its index so it won't get deleted soon.
+                    compiledScripts.addLast(entry);
                 }
-                // stroring is done here:
-                compiledScripts.addLast(new Entry(scriptstr, script));
+
+                return script.exec(cx, globalObject);
+            }
+        };
+        try {
+            return contextFactory.call(evalAction);
+        } catch (InterpreterException ie) {
+            throw ie;
+        } catch (JavaScriptException e) {
+            // exception from JavaScript (possibly wrapping a Java Ex)
+            Object value = e.getValue();
+            Exception ex = value instanceof Exception ? (Exception) value : e;
+            throw new InterpreterException(ex, ex.getMessage(), -1, -1);
+        } catch (WrappedException we) {
+            Throwable w = we.getWrappedException();
+            if (w instanceof Exception) {
+                throw new InterpreterException
+                    ((Exception) w, w.getMessage(), -1, -1);
             } else {
-                // this script has been compiled before,
-                // just update it's index so it won't get deleted soon.
-                compiledScripts.addLast(et);
-            }
-
-            try {
-                rv = script.exec(ctx, globalObject);
-            } catch (JavaScriptException e) {
-                // exception from JavaScript (possibly wrapping a Java Ex)
-                if (e.getValue() instanceof Exception) {
-                    Exception ex = (Exception)e.getValue();
-                    throw new InterpreterException(ex, ex.getMessage(), -1,-1);
-                } else
-                    throw new InterpreterException(e, e.getMessage(), -1, -1);
-            } catch (WrappedException we) {
-                // main Rhino RuntimeException
-                throw
-                    new InterpreterException
-                    ((Exception)we.getWrappedException(),
-                     we.getWrappedException().getMessage(), -1, -1);
-            } catch (RuntimeException re) {
-                // other RuntimeExceptions
-                throw new InterpreterException(re, re.getMessage(), -1, -1);
+                throw new InterpreterException(w.getMessage(), -1, -1);
             }
-
-        } finally {
-            Context.exit();
+        } catch (RuntimeException re) {
+            throw new InterpreterException(re, re.getMessage(), -1, -1);
         }
-        return rv;
     }
 
     /**
@@ -400,8 +382,8 @@
      */
     public void dispose() {
         if (rhinoClassLoader != null) {
-            Context.setCachingEnabled(false);
-            Context.setCachingEnabled(true);
+            ClassCache cache = ClassCache.get(globalObject);
+            cache.setCachingEnabled(false);
         }
     }
 
@@ -411,78 +393,82 @@
      * @param name the name of the script object to create
      * @param object the Java object
      */
-    public void bindObject(String name, Object object) {
-        enterContext();
-        try {
-            if (name.equals(BIND_NAME_WINDOW) && object instanceof Window) {
-                ((WindowWrapper)globalObject).window = (Window)object;
-                window = (Window)object;
-                object = globalObject;
-            }
-            Scriptable jsObject;
-            jsObject = Context.toObject(object, globalObject);
-            globalObject.put(name, globalObject, jsObject);
-        } finally {
-            Context.exit();
-        }
+    public void bindObject(final String name, final Object object) {
+        contextFactory.call(new ContextAction() {
+            public Object run(Context cx) {
+                Object o = object;
+                if (name.equals(BIND_NAME_WINDOW) && object instanceof Window) {
+                    ((WindowWrapper) globalObject).window = (Window) object;
+                    window = (Window) object;
+                    o = globalObject;
+                }
+                Scriptable jsObject;
+                jsObject = Context.toObject(o, globalObject);
+                globalObject.put(name, globalObject, jsObject);
+                return null;
+            }
+        });
     }
 
     /**
      * To be used by <code>EventTargetWrapper</code>.
      */
-    void callHandler(Function handler, Object arg)
-        throws JavaScriptException {
-        Context ctx = enterContext();
-        try {
-            arg = Context.toObject(arg, globalObject);
-            Object[] args = {arg};
-            handler.call(ctx, globalObject, globalObject, args);
-        } finally {
-            Context.exit();
-        }
+    void callHandler(final Function handler, final Object arg) {
+        contextFactory.call(new ContextAction() {
+            public Object run(Context cx) {
+                Object a = Context.toObject(arg, globalObject);
+                Object[] args = { a };
+                handler.call(cx, globalObject, globalObject, args);
+                return null;
+            }
+        });
     }
 
     /**
      * To be used by <code>WindowWrapper</code>.
      */
-    void callMethod(ScriptableObject obj,
-                    String methodName,
-                    ArgumentsBuilder ab)
-        throws JavaScriptException {
-        enterContext();
-        try {
-            ScriptableObject.callMethod(obj, methodName, ab.buildArguments());
-        } finally {
-            Context.exit();
-        }
+    void callMethod(final ScriptableObject obj,
+                    final String methodName,
+                    final ArgumentsBuilder ab) {
+        contextFactory.call(new ContextAction() {
+            public Object run(Context cx) {
+                ScriptableObject.callMethod
+                    (obj, methodName, ab.buildArguments());
+                return null;
+            }
+        });
     }
 
     /**
      * To be used by <code>WindowWrapper</code>.
      */
-    void callHandler(Function handler,
-                     Object[] args)
-        throws JavaScriptException {
-        Context ctx = enterContext();
-        try {
-            handler.call(ctx, globalObject, globalObject, args);
-        } finally {
-            Context.exit();
-        }
+    void callHandler(final Function handler, final Object[] args) {
+        contextFactory.call(new ContextAction() {
+            public Object run(Context cx) {
+                handler.call(cx, globalObject, globalObject, args);
+                return null;
+            }
+        });
     }
 
     /**
      * To be used by <code>WindowWrapper</code>.
      */
-    void callHandler(Function handler, ArgumentsBuilder ab)
-        throws JavaScriptException {
-        Context ctx = enterContext();
-        try {
-            Object [] args = ab.buildArguments();
-           handler.call(ctx, handler.getParentScope(), globalObject, args );
-        } finally {
-            Context.exit();
-        }
+    void callHandler(final Function handler, final ArgumentsBuilder ab) {
+        contextFactory.call(new ContextAction() {
+            public Object run(Context cx) {
+                Object[] args = ab.buildArguments();
+                handler.call(cx, handler.getParentScope(), globalObject, args);
+                return null;
+            }
+        });
+    }
+
+    /**
+     * To be used by <code>EventTargetWrapper</code>.
+     */
+    Object call(ContextAction action) {
+        return contextFactory.call(action);
     }
 
     /**
@@ -515,7 +501,7 @@
      * the default one.
      */
     public Locale getLocale() {
-        // <!> TODO : in Rhino the local is for a thread not a scope..
+        // <!> TODO : in Rhino the locale is for a thread not a scope..
         return null;
     }
 
@@ -541,5 +527,49 @@
      */
     public String formatMessage(String key, Object[] args) {
         return null;
+    }
+
+    /**
+     * Class to store cached compiled scripts.
+     */
+    protected static class Entry {
+
+        /**
+         * The script string.
+         */
+        public String str;
+
+        /**
+         * The compiled script.
+         */
+        public Script script;
+
+        /**
+         * Creates a new script cache entry object.
+         */
+        public Entry(String str, Script script) {
+            this.str = str;
+            this.script = script;
+        }
+    }
+
+    /**
+     * Factory for Context objects.
+     */
+    protected class Factory extends ContextFactory {
+
+        /**
+         * Creates a Context object for use with the interpreter.
+         */
+        protected Context makeContext() {
+            Context cx = super.makeContext();
+            cx.setWrapFactory(wrapFactory);
+            cx.setSecurityController(securityController);
+            cx.setClassShutter(classShutter);
+            if (rhinoClassLoader == null) {
+                cx.setOptimizationLevel(-1);
+            }
+            return cx;
+        }
     }
 }

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/WindowWrapper.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/WindowWrapper.java?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/WindowWrapper.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/WindowWrapper.java Thu Mar 23 23:50:03 2006
@@ -26,9 +26,7 @@
 import org.mozilla.javascript.Context;
 import org.mozilla.javascript.Function;
 import org.mozilla.javascript.ImporterTopLevel;
-import org.mozilla.javascript.JavaScriptException;
 import org.mozilla.javascript.NativeObject;
-import org.mozilla.javascript.PropertyException;
 import org.mozilla.javascript.Scriptable;
 import org.mozilla.javascript.ScriptableObject;
 import org.mozilla.javascript.WrappedException;
@@ -64,12 +62,8 @@
         String[] names = { "setInterval", "setTimeout", "clearInterval", 
                            "clearTimeout", "parseXML", "getURL", "postURL",
                            "alert", "confirm", "prompt" };
-        try {
-            this.defineFunctionProperties(names, WindowWrapper.class,
-                                          ScriptableObject.DONTENUM);
-        } catch (PropertyException e) {
-            throw new Error();  // should never happen
-        }
+        this.defineFunctionProperties(names, WindowWrapper.class,
+                                      ScriptableObject.DONTENUM);
     }
 
     public String getClassName() {
@@ -86,8 +80,7 @@
     public static Object setInterval(Context cx,
                                      Scriptable thisObj,
                                      Object[] args,
-                                     Function funObj)
-        throws JavaScriptException {
+                                     Function funObj) {
         int len = args.length;
         WindowWrapper ww = (WindowWrapper)thisObj;
         Window window = ww.window;
@@ -95,7 +88,7 @@
         if (len < 2) {
             throw Context.reportRuntimeError("invalid argument count");
         }
-        long to = ((Long)Context.toType(args[1], Long.TYPE)).longValue();
+        long to = ((Long)Context.jsToJava(args[1], Long.TYPE)).longValue();
         if (args[0] instanceof Function) {
             RhinoInterpreter interp =
                 (RhinoInterpreter)window.getInterpreter();
@@ -105,7 +98,7 @@
             return Context.toObject(window.setInterval(fw, to), thisObj);
         }
         String script =
-	  (String)Context.toType(args[0], String.class);
+            (String)Context.jsToJava(args[0], String.class);
         return Context.toObject(window.setInterval(script, to), thisObj);
     }
 
@@ -115,15 +108,14 @@
     public static Object setTimeout(Context cx,
                                     Scriptable thisObj,
                                     Object[] args,
-                                    Function funObj)
-        throws JavaScriptException {
+                                    Function funObj) {
         int len = args.length;
         WindowWrapper ww = (WindowWrapper)thisObj;
         Window window = ww.window;
         if (len < 2) {
             throw Context.reportRuntimeError("invalid argument count");
         }
-        long to = ((Long)Context.toType(args[1], Long.TYPE)).longValue();
+        long to = ((Long)Context.jsToJava(args[1], Long.TYPE)).longValue();
         if (args[0] instanceof Function) {
             RhinoInterpreter interp =
                 (RhinoInterpreter)window.getInterpreter();
@@ -133,7 +125,7 @@
             return Context.toObject(window.setTimeout(fw, to), thisObj);
         }
         String script =
-            (String)Context.toType(args[0], String.class);
+            (String)Context.jsToJava(args[0], String.class);
         return Context.toObject(window.setTimeout(script, to), thisObj);
     }
 
@@ -143,13 +135,12 @@
     public static void clearInterval(Context cx,
                                      Scriptable thisObj,
                                      Object[] args,
-                                     Function funObj)
-        throws JavaScriptException {
+                                     Function funObj) {
         int len = args.length;
         WindowWrapper ww = (WindowWrapper)thisObj;
         Window window = ww.window;
         if (len >= 1) {
-            window.clearInterval(Context.toType(args[0], Object.class));
+            window.clearInterval(Context.jsToJava(args[0], Object.class));
         }
     }
 
@@ -159,13 +150,12 @@
     public static void clearTimeout(Context cx,
                                     Scriptable thisObj,
                                     Object[] args,
-                                    Function funObj)
-        throws JavaScriptException {
+                                    Function funObj) {
         int len = args.length;
         WindowWrapper ww = (WindowWrapper)thisObj;
         Window window = ww.window;
         if (len >= 1) {
-            window.clearTimeout(Context.toType(args[0], Object.class));
+            window.clearTimeout(Context.jsToJava(args[0], Object.class));
         }
     }
 
@@ -175,8 +165,7 @@
     public static Object parseXML(Context cx,
                                   Scriptable thisObj,
                                   final Object[] args,
-                                  Function funObj)
-        throws JavaScriptException {
+                                  Function funObj) {
         int len = args.length;
         WindowWrapper ww = (WindowWrapper)thisObj;
         final Window window = ww.window;
@@ -190,8 +179,8 @@
         Object ret = AccessController.doPrivileged( new PrivilegedAction() {
                 public Object run() {
                     return window.parseXML
-                        ((String)Context.toType(args[0], String.class),
-                         (Document)Context.toType(args[1], Document.class));
+                        ((String)Context.jsToJava(args[0], String.class),
+                         (Document)Context.jsToJava(args[1], Document.class));
                 }
             }, acc);
         return Context.toObject(ret, thisObj);
@@ -203,8 +192,7 @@
     public static void getURL(Context cx,
                               Scriptable thisObj,
                               final Object[] args,
-                              Function funObj)
-        throws JavaScriptException {
+                              Function funObj) {
         int len = args.length;
         WindowWrapper ww = (WindowWrapper)thisObj;
         final Window window = ww.window;
@@ -213,7 +201,7 @@
         }
         RhinoInterpreter interp =
             (RhinoInterpreter)window.getInterpreter();
-        final String uri = (String)Context.toType(args[0], String.class);
+        final String uri = (String)Context.jsToJava(args[0], String.class);
         Window.URLResponseHandler urlHandler = null;
         if (args[1] instanceof Function) {
             urlHandler = new GetURLFunctionWrapper
@@ -239,7 +227,7 @@
                     public Object run() {
                         window.getURL
                             (uri, fw,
-                             (String)Context.toType(args[2], String.class));
+                             (String)Context.jsToJava(args[2], String.class));
                         return null;
                     }
                 }, acc);
@@ -252,8 +240,7 @@
     public static void postURL(Context cx,
                                Scriptable thisObj,
                                final Object[] args,
-                               Function funObj)
-        throws JavaScriptException {
+                               Function funObj) {
         int len = args.length;
         WindowWrapper ww = (WindowWrapper)thisObj;
         final Window window = ww.window;
@@ -262,8 +249,8 @@
         }
         RhinoInterpreter interp =
             (RhinoInterpreter)window.getInterpreter();
-        final String uri     = (String)Context.toType(args[0], String.class);
-        final String content = (String)Context.toType(args[1], String.class);
+        final String uri     = (String)Context.jsToJava(args[0], String.class);
+        final String content = (String)Context.jsToJava(args[1], String.class);
         Window.URLResponseHandler urlHandler = null;
         if (args[2] instanceof Function) {
             urlHandler = new GetURLFunctionWrapper
@@ -291,7 +278,7 @@
                     public Object run() {
                         window.postURL
                             (uri, content, fw,
-                             (String)Context.toType(args[3], String.class));
+                             (String)Context.jsToJava(args[3], String.class));
                         return null;
                     }
                 }, acc);
@@ -301,8 +288,8 @@
                     public Object run() {
                         window.postURL
                             (uri, content, fw,
-                             (String)Context.toType(args[3], String.class),
-                             (String)Context.toType(args[4], String.class));
+                             (String)Context.jsToJava(args[3], String.class),
+                             (String)Context.jsToJava(args[4], String.class));
                         return null;
                     }
                 }, acc);
@@ -315,14 +302,13 @@
     public static void alert(Context cx,
                              Scriptable thisObj,
                              Object[] args,
-                             Function funObj)
-        throws JavaScriptException {
+                             Function funObj) {
         int len = args.length;
         WindowWrapper ww = (WindowWrapper)thisObj;
         Window window = ww.window;
         if (len >= 1) {
             String message =
-                (String)Context.toType(args[0], String.class);
+                (String)Context.jsToJava(args[0], String.class);
             window.alert(message);
         }
     }
@@ -333,14 +319,13 @@
     public static Object confirm(Context cx,
                                   Scriptable thisObj,
                                   Object[] args,
-                                  Function funObj)
-        throws JavaScriptException {
+                                  Function funObj) {
         int len = args.length;
         WindowWrapper ww = (WindowWrapper)thisObj;
         Window window = ww.window;
         if (len >= 1) {
             String message =
-                (String)Context.toType(args[0], String.class);
+                (String)Context.jsToJava(args[0], String.class);
             if (window.confirm(message))
                 return Context.toObject(Boolean.TRUE, thisObj);
             else
@@ -355,8 +340,7 @@
     public static Object prompt(Context cx,
                                 Scriptable thisObj,
                                 Object[] args,
-                                Function funObj)
-        throws JavaScriptException {
+                                Function funObj) {
 
         WindowWrapper ww = (WindowWrapper)thisObj;
         Window window = ww.window;
@@ -420,11 +404,7 @@
          * Calls the function.
          */
         public void run() {
-            try {
-                interpreter.callHandler(function, arguments);
-            } catch (JavaScriptException e) {
-                throw new WrappedException(e);
-            }
+            interpreter.callHandler(function, arguments);
         }
     }
 
@@ -468,14 +448,10 @@
         public void getURLDone(final boolean success,
                                final String mime,
                                final String content) {
-            try {
-                interpreter.callHandler
-                    (function, 
-                     new GetURLDoneArgBuilder(success, mime, 
-                                              content, windowWrapper));
-            } catch (JavaScriptException e) {
-                throw new WrappedException(e);
-            }
+            interpreter.callHandler
+                (function, 
+                 new GetURLDoneArgBuilder(success, mime, 
+                                          content, windowWrapper));
         }
     }
 
@@ -522,15 +498,10 @@
         public void getURLDone(final boolean success,
                                final String mime,
                                final String content) {
-            try {
-                interpreter.callMethod
-                    (object, COMPLETE,
-                     new GetURLDoneArgBuilder(success, mime, 
-                                              content, windowWrapper));
-            } catch (JavaScriptException e) {
-                Context.exit();
-                throw new WrappedException(e);
-            }
+            interpreter.callMethod
+                (object, COMPLETE,
+                 new GetURLDoneArgBuilder(success, mime, 
+                                          content, windowWrapper));
         }
     }
 

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/svg12/GlobalWrapper.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/svg12/GlobalWrapper.java?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/svg12/GlobalWrapper.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/svg12/GlobalWrapper.java Thu Mar 23 23:50:03 2006
@@ -1,6 +1,6 @@
 /*
 
-   Copyright 2005  The Apache Software Foundation 
+   Copyright 2005-2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -22,9 +22,7 @@
 
 import org.mozilla.javascript.Context;
 import org.mozilla.javascript.Function;
-import org.mozilla.javascript.JavaScriptException;
 import org.mozilla.javascript.NativeJavaObject;
-import org.mozilla.javascript.PropertyException;
 import org.mozilla.javascript.Scriptable;
 import org.mozilla.javascript.ScriptableObject;
 
@@ -44,12 +42,8 @@
     public GlobalWrapper(Context context) {
         super(context);
         String[] names = { "startMouseCapture", "stopMouseCapture" };
-        try {
-            this.defineFunctionProperties(names, GlobalWrapper.class,
-                                          ScriptableObject.DONTENUM);
-        } catch (PropertyException e) {
-            throw new Error();  // should never happen
-        }
+        this.defineFunctionProperties(names, GlobalWrapper.class,
+                                      ScriptableObject.DONTENUM);
     }
 
     public String getClassName() {
@@ -66,8 +60,7 @@
     public static void startMouseCapture(Context cx,
                                          Scriptable thisObj,
                                          Object[] args,
-                                         Function funObj)
-            throws JavaScriptException {
+                                         Function funObj) {
         int len = args.length;
         GlobalWrapper gw = (GlobalWrapper) thisObj;
         SVGGlobal global = (SVGGlobal) gw.window;

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java Thu Mar 23 23:50:03 2006
@@ -1,6 +1,6 @@
 /*
 
-   Copyright 2001-2005  The Apache Software Foundation 
+   Copyright 2001-2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -693,11 +693,8 @@
             break;
         case AUTODETECT:
             isDynamicDocument = bridgeContext.isDynamicDocument(doc);
-            if (isDynamicDocument)
-                isInteractiveDocument = true;
-            else
-                isInteractiveDocument = 
-                    bridgeContext.isInteractiveDocument(doc);
+            isInteractiveDocument =
+                isDynamicDocument || bridgeContext.isInteractiveDocument(doc);
         }
 
         if (isInteractiveDocument) {

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/util/Service.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/sources/org/apache/batik/util/Service.java?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/util/Service.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/util/Service.java Thu Mar 23 23:50:03 2006
@@ -31,7 +31,7 @@
 
 /**
  * This class handles looking up service providers on the class path.
- * it implements the system described in:
+ * It implements the system described in:
  *
  * <a href='http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service Provider'> JAR
  * File Specification Under Service Provider</a>. Note that this
@@ -39,7 +39,8 @@
  * be missing in the JDK.
  *
  * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
- * @version $Id$ */
+ * @version $Id$
+ */
 public class Service {
 
     // Remember providers we have looked up before.
@@ -49,7 +50,7 @@
      * Returns an iterator where each element should implement the
      * interface (or subclass the baseclass) described by cls.  The
      * Classes are found by searching the classpath for service files
-     * named: 'META-INF/services/<fully qualified classname> that list
+     * named: 'META-INF/services/&lt;fully qualified classname&gt; that list
      * fully qualifted classnames of classes that implement the
      * service files classes interface.  These classes must have
      * default constructors.

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/util/SoftReferenceCache.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/sources/org/apache/batik/util/SoftReferenceCache.java?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/util/SoftReferenceCache.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/util/SoftReferenceCache.java Thu Mar 23 23:50:03 2006
@@ -25,23 +25,35 @@
  * take some time to load or create, such as images loaded from the 
  * network.
  *
- * Adding an object is two fold: <br />
- * + First you add the key, this lets the cache know that someone is
- *   working on that key.  <br />
- * + Then when the completed object is ready you put it into the cache.<P>
+ * <p>Adding an object is two fold:</p>
+ * <ul>
+ *   <li>
+ *     First you add the key, this lets the cache know that someone is
+ *     working on that key.
+ *   </li>
+ *   <li>
+ *     Then when the completed object is ready you put it into the cache.
+ *   </li>
+ * </ul>
+ * <p>
+ *   If someone requests a key after it has been added but before it has
+ *   been put they will be blocked until the put.
+ * </p>
  *
- * If someone requests a key after it has been added but before it has
- * been put they will be blocked until the put.
+ * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
+ * @version $Id$
  */
-
 public class SoftReferenceCache {
-    HashMap map = new HashMap();
 
     /**
-     * Let people create there own caches.
+     * The map of cached objects.
      */
-    protected SoftReferenceCache() { }
+    protected HashMap map = new HashMap();
 
+    /**
+     * Let people create their own caches.
+     */
+    protected SoftReferenceCache() { }
 
     /**
      * Let people flush the cache (remove any cached data).  Pending

Modified: xmlgraphics/batik/trunk/xdocs/faq.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/xdocs/faq.xml?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/xdocs/faq.xml (original)
+++ xmlgraphics/batik/trunk/xdocs/faq.xml Thu Mar 23 23:50:03 2006
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!--
 
-   Copyright 2000-2005  The Apache Software Foundation 
+   Copyright 2000-2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -251,9 +251,9 @@
     <question>How does Batik relate to other Apache projects?</question>
     <answer>
         <p>
-        Batik is used in <link href="http://xml.apache.org/cocoon/index.html">Cocoon</link> 
+        Batik is used in <link href="http://cocoon.apache.org/">Cocoon</link> 
         for server side rasterization of SVG images. In addition, the Batik is used in the 
-        <link href="http://xml.apache.org/fop/index.html">FOP</link> project to convert 
+        <link href="http://xmlgraphics.apache.org/fop/">FOP</link> project to convert 
         SVG images to PDF format.
         </p>
     </answer>

Modified: xmlgraphics/batik/trunk/xdocs/images/splash.xsl
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/xdocs/images/splash.xsl?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/xdocs/images/splash.xsl (original)
+++ xmlgraphics/batik/trunk/xdocs/images/splash.xsl Thu Mar 23 23:50:03 2006
@@ -1,7 +1,7 @@
 <?xml version="1.0" standalone="no"?>
 <!--
 
-   Copyright 2002,2004-2005  The Apache Software Foundation 
+   Copyright 2002,2004-2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -101,7 +101,7 @@
         <text x="246" y="95"><tspan font-size="95"
         >batik</tspan> <xsl:value-of select="$version" /></text>
         <text font-size="17" x="246" y="130"
-          >http://xml.apache.org/batik</text>
+          >http://xmlgraphics.apache.org/batik</text>
       </g>
 
       <xsl:if test="$revisionType != 'revisionType'">

Modified: xmlgraphics/batik/trunk/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/xdocs/index.xml?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/xdocs/index.xml (original)
+++ xmlgraphics/batik/trunk/xdocs/index.xml Thu Mar 23 23:50:03 2006
@@ -3,7 +3,7 @@
 
 <!--
 
-   Copyright 2000-2004  The Apache Software Foundation 
+   Copyright 2000-2004,2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -188,8 +188,8 @@
         <p>While it is hard to track projects and products which are using Batik, here are a few
         ones which are known:</p>
         <ul>
-        <li><link href="http://xml.apache.org/cocoon">The Apache Cocoon project</link> uses Batik to rasterize SVG images. </li>
-        <li><link href="http://xml.apache.org/fop">The Apache FOP project</link> uses Batik to handle SVG images. It uses the SVG rasterizer and extends the Batik transcoder architecture to offer SVG to PDF conversion.</li>
+        <li><link href="http://cocoon.apache.org/">The Apache Cocoon project</link> uses Batik to rasterize SVG images. </li>
+        <li><link href="http://xmlgraphics.apache.org/fop">The Apache FOP project</link> uses Batik to handle SVG images. It uses the SVG rasterizer and extends the Batik transcoder architecture to offer SVG to PDF conversion.</li>
         <li><link href="http://www.bitflash.com/products/brilliance.asp">BitFlash Brilliance</link> delivers a robust set of graphic-design and source-code editing tools for fast and flexible Mobile SVG development. It uses Batik to display SVG Images.</li>
         <li><link href="http://burma.free.fr">eDoc</link>, a page layout software, is using the Batik SVG generator to export pages to SVG</li>
         <li><link href="http://www.elixirtech.com/ElixirReport">ElixirTech's ElixirReport</link> uses Batik for charting and for its SVG component.</li>

Modified: xmlgraphics/batik/trunk/xdocs/pr.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/xdocs/pr.xml?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/xdocs/pr.xml (original)
+++ xmlgraphics/batik/trunk/xdocs/pr.xml Thu Mar 23 23:50:03 2006
@@ -3,7 +3,7 @@
 
 <!--
 
-   Copyright 2000-2002,2004-2005  The Apache Software Foundation 
+   Copyright 2000-2002,2004-2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -146,7 +146,7 @@
 
 <p>Batik delivers a number of sample applications that leverage its core
 modules, such as an SVG browser. Screenshots of that browser can
-be seen at: <link href="http://xml.apache.org/batik/svgviewer.html">http://xml.apache.org/batik/svgviewer.html</link></p>
+be seen at: <link href="http://xmlgraphics.apache.org/batik/svgviewer.html">http://xmlgraphics.apache.org/batik/svgviewer.html</link></p>
  
 <p>In the near future, the Batik team aims to provide developers worldwide
 support for full dynamic behavior, including scripting and SMIL
@@ -192,7 +192,7 @@
 <link href="http://xmlgraphics.apache.org/mail.html">http://xmlgraphics.apache.org/mail.html</link></p>
  
 <p>For more information about the Batik project please see
-<link href="http://xml.apache.org/batik/">http://xml.apache.org/batik/</link></p>
+<link href="http://xmlgraphics.apache.org/batik/">http://xmlgraphics.apache.org/batik/</link></p>
  
 <p><em>ABOUT THE APACHE SOFTWARE FOUNDATION</em><br /><br />
  

Modified: xmlgraphics/batik/trunk/xdocs/skins/printer/stylesheets/changes2document.xsl
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/xdocs/skins/printer/stylesheets/changes2document.xsl?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/xdocs/skins/printer/stylesheets/changes2document.xsl (original)
+++ xmlgraphics/batik/trunk/xdocs/skins/printer/stylesheets/changes2document.xsl Thu Mar 23 23:50:03 2006
@@ -2,7 +2,7 @@
 
 <!--
 
-   Copyright 2000-2001 The Apache Software Foundation 
+   Copyright 2000-2001,2006 The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -58,7 +58,7 @@
 
    <xsl:if test="@fixes-bug">
     <xsl:text> Fixes </xsl:text>
-    <link href="http://xml.apache.org/bugs/show_bug.cgi?id={@fixes-bug}">
+    <link href="http://issues.apache.org/bugzilla/show_bug.cgi?id={@fixes-bug}">
      <xsl:text>bug </xsl:text><xsl:value-of select="@fixes-bug"/>
     </link>
     <xsl:text>.</xsl:text>
@@ -70,4 +70,4 @@
   <!-- remove -->
  </xsl:template>
 
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>

Modified: xmlgraphics/batik/trunk/xdocs/skins/xml.apache.org/stylesheets/changes2document.xsl
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/xdocs/skins/xml.apache.org/stylesheets/changes2document.xsl?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/xdocs/skins/xml.apache.org/stylesheets/changes2document.xsl (original)
+++ xmlgraphics/batik/trunk/xdocs/skins/xml.apache.org/stylesheets/changes2document.xsl Thu Mar 23 23:50:03 2006
@@ -2,7 +2,7 @@
 
 <!--
 
-   Copyright 2000-2001 The Apache Software Foundation 
+   Copyright 2000-2001,2006 The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -59,7 +59,7 @@
 
    <xsl:if test="@fixes-bug">
     <xsl:text> Fixes </xsl:text>
-    <link href="http://xml.apache.org/bugs/show_bug.cgi?id={@fixes-bug}">
+    <link href="http://issues.apache.org/bugzilla/show_bug.cgi?id={@fixes-bug}">
      <xsl:text>bug </xsl:text><xsl:value-of select="@fixes-bug"/>
     </link>
     <xsl:text>.</xsl:text>

Modified: xmlgraphics/batik/trunk/xdocs/svgrasterizer.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/xdocs/svgrasterizer.xml?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/xdocs/svgrasterizer.xml (original)
+++ xmlgraphics/batik/trunk/xdocs/svgrasterizer.xml Thu Mar 23 23:50:03 2006
@@ -3,7 +3,7 @@
 
 <!--
 
-   Copyright 2000-2003  The Apache Software Foundation 
+   Copyright 2000-2003,2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -127,7 +127,7 @@
                     <li><code>java -jar batik-rasterizer.jar -d myDir -m image/jpeg samples/*.svg</code> will generate JPEG images
                     for all the SVG files found in the samples directory.</li>
                 </ul>
-                <p><strong>NOTE:</strong> to run MIME type <code>application/pdf</code> need to have (see <link href="http://xml.apache.org/fop/index.html">FOP</link>) installed.</p>
+                <p><strong>NOTE:</strong> to run MIME type <code>application/pdf</code> need to have (see <link href="http://xmlgraphics.apache.org/fop/">FOP</link>) installed.</p>
             </s2>
 
             <s2 title="Using the source distribution">
@@ -172,7 +172,7 @@
 
             <p>The task is able to produce four raster formats: PNG, JPEG, Tiff 
             and PDF. You need to have 
-            <link href="http://xml.apache.org/fop/">FOP</link> installed (versions after 
+            <link href="http://xmlgraphics.apache.org/fop/">FOP</link> installed (versions after 
             0.20.2 should work) in your <em>CLASSPATH</em> if you want to 
             produce result images in PDF format.</p>
 

Modified: xmlgraphics/batik/trunk/xdocs/whoAreWe.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/xdocs/whoAreWe.xml?rev=388441&r1=388440&r2=388441&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/xdocs/whoAreWe.xml (original)
+++ xmlgraphics/batik/trunk/xdocs/whoAreWe.xml Thu Mar 23 23:50:03 2006
@@ -3,7 +3,7 @@
 
 <!--
 
-   Copyright 2000-2003,2005  The Apache Software Foundation 
+   Copyright 2000-2003,2005-2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -212,7 +212,7 @@
               mailing lists.</li>
           <li><link href="mailto:Christophe.Held@sophia.inria.fr">Christophe Held</link> - Contributed a math formula in SVG 
               generated from MathML. </li>
-          <li><link href="mailto:keiron@aftexsw.com">Keiron Liddle</link> - A <link href="http://xml.apache.org/fop">FOP</link>
+          <li><link href="mailto:keiron@aftexsw.com">Keiron Liddle</link> - A <link href="http://xmlgraphics.apache.org/fop">FOP</link>
               member who is working on an SVG to PDF transcoder that will be part of FOP but that will work in 
               the Batik infrastructure</li>
           <li><link href="mailto:john.morrison@uk.experian.com">John Morrison</link> - Contributed a set of XSL stylesheets