Ported r201417:r209919 from trunk (all changes since svg12 branch
was created).


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/batik/branches/svg12@215909 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/build.xml b/build.xml
index b817f6d..15d7f03 100644
--- a/build.xml
+++ b/build.xml
@@ -1,6 +1,6 @@
 <!--
 
-   Copyright 2000-2004  The Apache Software Foundation 
+   Copyright 2000-2005  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.
@@ -77,42 +77,43 @@
 
   <target name="init" depends="init-args">
     <tstamp/>
-    <property name="Project"         value="Batik"/>
-    <property name="project"         value="batik"/>
-    <property name="year"            value="2004"/>
-    <property name="version"         value="1.5.1"/>
-    <property name="revisionType"    value=""/>
-    <property name="revisionNumber"  value="" />
+    <property name="Project"            value="Batik"/>
+    <property name="project"            value="batik"/>
+    <property name="year"               value="2005"/>
+    <property name="version"            value="1.6"/>
+    <property name="revisionType"       value=""/>
+    <property name="revisionNumber"     value=""/>
 
     <property file="build.properties"/>
-    <property name="debug"           value="on"/>
-    <property name="optimize"        value="off"/>
-    <property name="deprecation"     value="off"/>
+    <property name="debug"              value="off"/>
+    <property name="optimize"           value="on"/>
+    <property name="deprecation"        value="on"/>
 
-    <property name="src"             value="sources"/>
-    <property name="resources"       value="resources"/>
-    <property name="testsrc"         value="test-sources"/>
-    <property name="testresources"   value="test-resources"/>
-    <property name="dest"            value="classes"/>
-    <property name="build"           value="${project}-${version}"/>
-    <property name="docs"            value="${build}/docs"/>
-    <property name="lib"             value="lib"/>
-    <property name="samples"         value="samples"/>
-    <property name="package-prefix"  value="org/apache/${project}"/>
+    <property name="src"                value="sources"/>
+    <property name="resources"          value="resources"/>
+    <property name="testsrc"            value="test-sources"/>
+    <property name="testresources"      value="test-resources"/>
+    <property name="dest"               value="classes"/>
+    <property name="build"              value="${project}-${version}"/>
+    <property name="docs"               value="${build}/docs"/>
+    <property name="lib"                value="lib"/>
+    <property name="samples"            value="samples"/>
+    <property name="package-prefix"     value="org/apache/${project}"/>
 
-    <property name="class-prefix"    value="org.apache.${project}"/>
+    <property name="class-prefix"       value="org.apache.${project}"/>
 
-    <property name="xdocs"           value="xdocs"/>
-    <property name="skins"           value="xdocs/skins"/>
-    <property name="stylebook-class" value="org.apache.stylebook.StyleBook"/>
+    <property name="xdocs"              value="xdocs"/>
+    <property name="skins"              value="xdocs/skins"/>
+    <property name="stylebook-class"    value="org.apache.stylebook.StyleBook"/>
+    <property name="javadoc-exclusions" value=""/>
 
-    <property name="site"            value="../xml-site/targets/${project}"/>
-    <property name="site-skin"       value="${skins}/xml.apache.org/"/>
-    <property name="print-skin"      value="${skins}/printer/"/>
+    <property name="site"               value="../xml-site/targets/${project}"/>
+    <property name="site-skin"          value="${skins}/xml.apache.org/"/>
+    <property name="print-skin"         value="${skins}/printer/"/>
 
-    <property name="test-reports"    value="test-reports" />
-    <property name="test-references" value="test-references" />
-    <property name="test-resources"  value="test-resources" />
+    <property name="test-reports"       value="test-reports" />
+    <property name="test-references"    value="test-references" />
+    <property name="test-resources"     value="test-resources" />
 
     <available property="rhino.present" classname="org.mozilla.javascript.Context">
       <classpath refid="libs-classpath"/>
@@ -133,6 +134,25 @@
         <equals arg1="${jdk14.present}" arg2="true"/>
       </not>
     </condition>
+
+    <condition property="javadoc-exclusions"
+               value="org.apache.batik.script.rhino">
+      <not>
+        <equals arg1="${rhino.present}" arg2="true"/>
+      </not>
+    </condition>
+    <condition property="javadoc-exclusions"
+               value="${javadoc-exclusions},org.apache.batik.script.jpython">
+      <not>
+        <equals arg1="${jpython.present}" arg2="true"/>
+      </not>
+    </condition>
+    <condition property="javadoc-exclusions"
+               value="${javadoc-exclusions},org.apache.batik.script.jacl">
+      <not>
+        <equals arg1="${jacl.present}" arg2="true"/>
+      </not>
+    </condition>
   </target>
 
   <path id="libs-classpath">
@@ -260,7 +280,7 @@
        </fileset>
     </copy>
     <copy file="${resources}/${package-prefix}/extensions/README.txt" 
-	  todir="${build}/extensions"/>
+          todir="${build}/extensions"/>
     <copy todir="${build}/samples">
       <fileset dir="samples"/>
     </copy>
@@ -466,7 +486,7 @@
 
 
   <!-- All batik in a single jar (dependencies: none) -->
-  <target name="all-jar" depends="compile, prepare-build">
+  <target name="all-jar" depends="compile, prepare-build" description="Creates a combined JAR file of the Batik libraries in ${build}/lib">
     <jar jarfile="${build}/lib/${project}-all.jar">
       <fileset dir="${dest}" excludes="**/CVS">
         <include name="**"/>
@@ -487,6 +507,7 @@
         <include name="org/w3c/css/sac/**"/>
         <include name="org/w3c/dom/smil/**"/>
         <include name="org/w3c/dom/svg/**"/>
+        <include name="org/w3c/dom/svg12/**"/>
       </fileset>
       <fileset dir="${resources}" excludes="${resources}/**/CVS">
         <include name="**"/>
@@ -860,7 +881,7 @@
   <target name="squiggle-ext-jar" depends="squiggle-jar">
      <mkdir dir="${build}/extensions"/>
      <jar manifest="${src}/${project}-browser-ext.mf"
-	  jarfile="${build}/extensions/${project}-squiggle-ext.jar">
+          jarfile="${build}/extensions/${project}-squiggle-ext.jar">
       <manifest>
         <attribute name="Implementation-Title" value="Batik Squiggle Viewer With Extensions"/>
         <attribute name="Implementation-Version" value="${version}${revisionType}${revisionNumber}"/>
@@ -904,7 +925,7 @@
   <target name="rasterizer-ext-jar" depends="rasterizer-jar">
      <mkdir dir="${build}/extensions"/>
      <jar manifest="${src}/${project}-rasterizer-ext.mf"
-	  jarfile="${build}/extensions/${project}-rasterizer-ext.jar">
+          jarfile="${build}/extensions/${project}-rasterizer-ext.jar">
       <manifest>
         <attribute name="Implementation-Title" value="Batik SVG Rasterizer With Extensions"/>
         <attribute name="Implementation-Version" value="${version}${revisionType}${revisionNumber}"/>
@@ -1152,6 +1173,11 @@
           description="Runs test suite whose file or uri is passed as an input">
     <java fork="yes"
           classname="${class-prefix}.test.xml.XMLTestSuiteRunner">
+<!-- Using -Xincgc makes the memory leak tests _much_ more accurate but
+     Also slows down the regard run by 3-4x,  In general I suggest running
+     just the memory leak tests with -Xincgc, I might also experiment with
+     a higher -Xms setting. -->
+<!--      <jvmarg value="-Xincgc" /> -->
 <!--      <jvmarg value="-Xrunhprof:format=b" /> -->
 <!--      <jvmarg value="-Xrunhprof:net=localhost:1234,format=b" /> -->
       <jvmarg value="-Xmx512m"/>  <jvmarg value="-Xms64m"/>
@@ -1235,7 +1261,7 @@
     <mkdir dir="${docs}"/>
   </target>
 
-  <target name="html" depends="javadoc, htmldoc"/>
+  <target name="html" depends="javadoc, htmldoc" description="generates the site documentation in ${build}/docs/"/>
   <target name="htmldoc" depends="prepare-docs">
     <copy file="${xdocs}/site-book.xml"
           tofile="${xdocs}/book.xml"
@@ -1282,6 +1308,7 @@
                            org.xml.*,
                            org.w3c.css.*,
                            org.w3c.dom.*"
+             excludepackagenames="${javadoc-exclusions}"
              maxmemory="128m"
              destdir="${docs}/javadoc"
              author="false"
@@ -1349,7 +1376,7 @@
   </target>
 
   <target name="jarDependImg" depends="compile"
-	  description="Updates jarDependImg PNG">
+          description="Updates jarDependImg PNG">
     <java fork="yes"
           classname="${class-prefix}.apps.rasterizer.Main">
       <classpath>
diff --git a/contrib/charts/xml/data.xml b/contrib/charts/xml/data.xml
index 0c8e2bb..6a682c1 100644
--- a/contrib/charts/xml/data.xml
+++ b/contrib/charts/xml/data.xml
@@ -1,13 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!--
- *****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.        *
- *                                                                           *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in  *
- * the LICENSE file.                                                         *
- *****************************************************************************
+   Copyright 2001 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.
+   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.
 -->
 
 <graph>
@@ -127,4 +133,4 @@
       </y>
     </axis>
   </meta>
-</graph>
\ No newline at end of file
+</graph>
diff --git a/contrib/charts/xsl/pie.xsl b/contrib/charts/xsl/pie.xsl
index 8d36e48..013fe13 100644
--- a/contrib/charts/xsl/pie.xsl
+++ b/contrib/charts/xsl/pie.xsl
@@ -1,13 +1,19 @@
 <?xml version="1.0"?>
 
 <!--
- *****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.        *
- *                                                                           *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in  *
- * the LICENSE file.                                                         *
- *****************************************************************************
+   Copyright 2001 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.
+   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.
 -->
 <!-- ====================================================================== -->
 <!-- Generate a simple pie chart.  Requires parser extensions for sin and   -->
@@ -86,4 +92,4 @@
   <xsl:value-of select="$radius * math:java.lang.Math.sin($rad)"/>
 </xsl:template>
 
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
diff --git a/contrib/fonts/gladiator/svg/glb12.svg b/contrib/fonts/gladiator/svg/glb12.svg
index 9532ab2..695272f 100755
--- a/contrib/fonts/gladiator/svg/glb12.svg
+++ b/contrib/fonts/gladiator/svg/glb12.svg
@@ -1,14 +1,23 @@
 <?xml version="1.0" standalone="no"?> 
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" > 
 
-<!-- ========================================================================= -->
-<!-- Copyright (C) The Apache Software Foundation. All rights reserved.        -->
-<!--                                                                           -->
-<!-- This software is published under the terms of the Apache Software License -->
-<!-- version 1.1, a copy of which has been included with this distribution in  -->
-<!-- the LICENSE file.                                                         -->
-<!-- ========================================================================= -->
+<!--
 
+   Copyright 2000-2001,2003  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.
+   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.
+
+-->
 <!-- ========================================================================= -->
 <!-- The Gladiator fonts where created and contributed by Bert Bos.            -->
 <!--                                                                           -->
diff --git a/contrib/jsvg/JSVG.java b/contrib/jsvg/JSVG.java
index b8e9636..ea4b4a4 100644
--- a/contrib/jsvg/JSVG.java
+++ b/contrib/jsvg/JSVG.java
@@ -34,7 +34,7 @@
  * It reports errors interactively, and it takes a list of URI's
  * to open.
  *
- * @author <a href="mailto:Thomas.DeWeese@Kodak.com>deweese</a>
+ * @author <a href="mailto:Thomas.DeWeese@Kodak.com">deweese</a>
  * @version $Id$
  */
 public class JSVG extends JFrame{
diff --git a/contrib/tiledTranscoder/TiledImageTranscoder.java b/contrib/tiledTranscoder/TiledImageTranscoder.java
index 22eb663..5ce844d 100644
--- a/contrib/tiledTranscoder/TiledImageTranscoder.java
+++ b/contrib/tiledTranscoder/TiledImageTranscoder.java
@@ -1,11 +1,20 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.        *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in  *
- * the LICENSE file.                                                         *
- *****************************************************************************/
+/*
 
+   Copyright 2003 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.
+   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.batik.apps.tiledTranscoder;
 
 import java.awt.image.renderable.*;
diff --git a/resources/org/apache/batik/apps/svgbrowser/resources/init.svg b/resources/org/apache/batik/apps/svgbrowser/resources/init.svg
index d2ecb04..787af2c 100644
--- a/resources/org/apache/batik/apps/svgbrowser/resources/init.svg
+++ b/resources/org/apache/batik/apps/svgbrowser/resources/init.svg
@@ -38,20 +38,12 @@
         <filter id="shadow" filterRes="200" x="-.2" y="-.1">
             <feGaussianBlur stdDeviation="3 3" />
             <feOffset dx="-10" dy="10" />
+            <feComponentTransfer result="shadow">
+               <feFuncA type="linear" slope=".5" intercept="0" />
+            </feComponentTransfer>
+            <feComposite in="SourceGraphic" in2="shadow" />
         </filter>
 
-        <filter id="innerShadow" filterRes="500" x="-.2" y="0">
-            <feGaussianBlur stdDeviation="3 4" in="SourceAlpha"/>
-            <feOffset dx="-10" dy="15" result="offsetShadow"/>
-            <feSpecularLighting in="offsetShadow" surfaceScale="-3" 
-                specularConstant="1" specularExponent="20" 
-                lighting-color="white"  result="light" kernelUnitLength="1" >
-                <feDistantLight azimuth="45" elevation="60" />
-            </feSpecularLighting>
-            <feComposite in2="SourceGraphic" in="light" operator="out" />
-        </filter>
-
-
             <path id="Outer_Ellipse" style="stroke:none;" d="M453.747,104.22C333.581-15.897,157.944-35.015,61.45,61.516c-96.493,96.533-77.301,272.161,42.866,392.278C224.48,573.911,400.117,593.031,496.61,496.498c96.493-96.533,77.302-272.161-42.863-392.278z
                          M461.486,454.618c-74.193,74.224-222.251,46.516-330.696-61.886C22.343,284.329-5.426,136.283,68.766,62.059c74.193-74.222,222.251-46.516,330.698,61.887c108.445,108.402,136.214,256.449,62.021,330.672z"/>
 
@@ -61,11 +53,11 @@
        <g id="words">
          <use xlink:href="#text"/>
          <g clip-path="url(#textClip)">
-             <use xlink:href="#text" transform="scale(0.9) rotate(20) translate(-20,-15)" filter="url(#shadow)" fill="black" opacity="0.4"/>
+             <use xlink:href="#text" transform="scale(0.9) rotate(20) translate(-20,-15)" filter="url(#shadow)" fill="black"/>
          </g>
        </g>
-        <g opacity="1.0" transform="translate(225, 250) rotate(-260)" id="rotatedText">
-        <g  transform="scale(0.9) rotate(20)">
+        <g transform="translate(225, 250) rotate(-260)" id="rotatedText">
+        <g  transform="scale(0.9) rotate(20)" opacity="0.9">
         <use xlink:href="#words"/>
         </g></g>
             <path id="Inner_Ellipse" style="stroke:none;" d="M399.464,123.946C291.018,15.543,142.959-12.163,68.766,62.059c-74.192,74.224-46.423,222.27,62.023,330.672c108.445,108.402,256.503,136.11,330.696,61.886c74.192-74.223,46.424-222.27-62.021-330.672z
@@ -77,7 +69,7 @@
         <circle cx="50" cy="50" r="50"/>
     </g>
 
-    <g filter="url(#innerShadow)" opacity=".5">
+    <g filter="url(#shadow)">
         <use xlink:href="#Outer_Ellipse" fill-opacity="1"/>
     </g>
 
@@ -86,7 +78,7 @@
 
     <g transform="translate(50, 154) scale(1.5, 1.5)">
     <use x="0" y="0" xlink:href="#batik" 
-         fill="black" fill-opacity=".5" filter="url(#shadow)"/>
+         fill="black" filter="url(#shadow)"/>
 
     <use x="0" y="0" xlink:href="#batik" 
          fill="none" stroke-width="8" stroke="rgb(13, 97, 160)"/>
@@ -97,7 +89,8 @@
 
         <use xlink:href="#rotatedText" fill="white" stroke-width="2" stroke="black"/>
         <g  transform="translate(50, 50) scale(0.254) rotate(30)">
-        <use xlink:href="#text" fill="black" filter="url(#shadow)" opacity="0.4" transform="translate(-10, 8)"/>
+        <use xlink:href="#text" fill="black" filter="url(#shadow)" 
+             transform="translate(-10, 8)"/>
         <use xlink:href="#text" stroke="black" stroke-width="16" fill="none"/>
         <use xlink:href="#text" stroke="none" fill="white"/>
         </g>
diff --git a/resources/org/apache/batik/apps/svgbrowser/resources/squiggle.png b/resources/org/apache/batik/apps/svgbrowser/resources/squiggle.png
index 31012ee..6f6e3d1 100644
--- a/resources/org/apache/batik/apps/svgbrowser/resources/squiggle.png
+++ b/resources/org/apache/batik/apps/svgbrowser/resources/squiggle.png
Binary files differ
diff --git a/resources/org/apache/batik/css/parser/resources/Messages.properties b/resources/org/apache/batik/css/parser/resources/Messages.properties
index 2354efa..db7688d 100644
--- a/resources/org/apache/batik/css/parser/resources/Messages.properties
+++ b/resources/org/apache/batik/css/parser/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 #
 # The error messages for the CSS parser.
 #
diff --git a/resources/org/apache/batik/dom/resources/Messages.properties b/resources/org/apache/batik/dom/resources/Messages.properties
index a6e5ba5..9345705 100644
--- a/resources/org/apache/batik/dom/resources/Messages.properties
+++ b/resources/org/apache/batik/dom/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 #
 # The error messages for DOM.
 #
@@ -60,6 +29,9 @@
 import.document.type = \
 A DocumentType node cannot be imported.
 
+add.self = \
+Cannot add a node as a child of it's self (name: {1})
+
 attribute.missing = \
 The "{0}" attribute was not found.
 
diff --git a/resources/org/apache/batik/dom/svg/resources/Messages.properties b/resources/org/apache/batik/dom/svg/resources/Messages.properties
index 84f2478..183b4a1 100644
--- a/resources/org/apache/batik/dom/svg/resources/Messages.properties
+++ b/resources/org/apache/batik/dom/svg/resources/Messages.properties
@@ -48,3 +48,7 @@
 
 readonly.rect = \
 This SVGRect is readonly.
+
+readonly.point = \
+This SVGPoint is readonly.
+
diff --git a/resources/org/apache/batik/ext/awt/image/spi/resources/Messages.properties b/resources/org/apache/batik/ext/awt/image/spi/resources/Messages.properties
index 559b888..1d12c5b 100644
--- a/resources/org/apache/batik/ext/awt/image/spi/resources/Messages.properties
+++ b/resources/org/apache/batik/ext/awt/image/spi/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
  
 stream.unreadable = \
 Stream data is corrupt or unsupported format
diff --git a/resources/org/apache/batik/ext/swing/resources/Messages.properties b/resources/org/apache/batik/ext/swing/resources/Messages.properties
index 7829060..ed11900 100644
--- a/resources/org/apache/batik/ext/swing/resources/Messages.properties
+++ b/resources/org/apache/batik/ext/swing/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 JAffineTransformChooser.label.angle = Angle
 
diff --git a/resources/org/apache/batik/parser/resources/Messages.properties b/resources/org/apache/batik/parser/resources/Messages.properties
index 0ed9364..e103701 100755
--- a/resources/org/apache/batik/parser/resources/Messages.properties
+++ b/resources/org/apache/batik/parser/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # The messages for the micro-parsers API.
diff --git a/resources/org/apache/batik/parser/style/resources/Messages.properties b/resources/org/apache/batik/parser/style/resources/Messages.properties
index 4b8caa9..b39e599 100644
--- a/resources/org/apache/batik/parser/style/resources/Messages.properties
+++ b/resources/org/apache/batik/parser/style/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # The default messages for the style package, in english.
diff --git a/resources/org/apache/batik/script/rhino/resources/messages.properties b/resources/org/apache/batik/script/rhino/resources/messages.properties
index 306d20d..2cf40cb 100644
--- a/resources/org/apache/batik/script/rhino/resources/messages.properties
+++ b/resources/org/apache/batik/script/rhino/resources/messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # The Rhino Interpreter resources
diff --git a/resources/org/apache/batik/svggen/font/resources/Messages.properties b/resources/org/apache/batik/svggen/font/resources/Messages.properties
index caece30..829c85d 100644
--- a/resources/org/apache/batik/svggen/font/resources/Messages.properties
+++ b/resources/org/apache/batik/svggen/font/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 SVGFont.config.usage = \
 usage: java org.apache.batik.svggen.font.SVGFont <ttf-path> [-l <range-begin>] [-h <range-end>] [-autorange] [-ascii] [-id <id>] [-o <output-path>] [-testcard]
diff --git a/resources/org/apache/batik/swing/resources/Messages.properties b/resources/org/apache/batik/swing/resources/Messages.properties
index b84134e..a1ca7a6 100644
--- a/resources/org/apache/batik/swing/resources/Messages.properties
+++ b/resources/org/apache/batik/swing/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # ToolTip formatting
diff --git a/resources/org/apache/batik/swing/svg/resources/Messages.properties b/resources/org/apache/batik/swing/svg/resources/Messages.properties
index 533bf5e..6c02edc 100644
--- a/resources/org/apache/batik/swing/svg/resources/Messages.properties
+++ b/resources/org/apache/batik/swing/svg/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 script.alert = \
 Script alert:\n{0}
diff --git a/resources/org/apache/batik/transcoder/image/resources/Messages.properties b/resources/org/apache/batik/transcoder/image/resources/Messages.properties
index 0a1ed2f..f7416d9 100644
--- a/resources/org/apache/batik/transcoder/image/resources/Messages.properties
+++ b/resources/org/apache/batik/transcoder/image/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 #
 # The error messages for the image transcoder.
 #
diff --git a/resources/org/apache/batik/util/gui/resources/UserStyleDialog.properties b/resources/org/apache/batik/util/gui/resources/UserStyleDialog.properties
index 3fe0338..fd0055a 100755
--- a/resources/org/apache/batik/util/gui/resources/UserStyleDialog.properties
+++ b/resources/org/apache/batik/util/gui/resources/UserStyleDialog.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # The resource file for the user style dialog.
diff --git a/resources/org/apache/batik/util/io/resources/Messages.properties b/resources/org/apache/batik/util/io/resources/Messages.properties
index 9c0c4eb..8636844 100644
--- a/resources/org/apache/batik/util/io/resources/Messages.properties
+++ b/resources/org/apache/batik/util/io/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 #
 # The error messages for the IO utilities.
 #
diff --git a/resources/org/apache/batik/util/resources/XMLResourceDescriptor.properties b/resources/org/apache/batik/util/resources/XMLResourceDescriptor.properties
index 0c51d86..938c236 100644
--- a/resources/org/apache/batik/util/resources/XMLResourceDescriptor.properties
+++ b/resources/org/apache/batik/util/resources/XMLResourceDescriptor.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 #
 # Author: Thierry Kormann
 
diff --git a/resources/org/apache/batik/xml/scanner/resources/Messages.properties b/resources/org/apache/batik/xml/scanner/resources/Messages.properties
index 3787f20..d9de7b3 100755
--- a/resources/org/apache/batik/xml/scanner/resources/Messages.properties
+++ b/resources/org/apache/batik/xml/scanner/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 #
 # The error messages for the XML scanner.
 #
diff --git a/samples/anne.svg b/samples/anne.svg
index f56ba9c..072119b 100644
--- a/samples/anne.svg
+++ b/samples/anne.svg
@@ -19,12 +19,12 @@
    limitations under the License.
 
 -->
-<!-- ========================================================================= -->
-<!-- Anne's portrait, Hommage a Andy Wahrol                                    -->
-<!--                                                                           -->
-<!-- @author vincent.hardy@eng.sun.com                                         -->
-<!-- @version $Id$                                                             -->
-<!-- ========================================================================= -->
+<!-- ====================================================================== -->
+<!-- Anne's portrait, Hommage a Andy Wahrol                                 -->
+<!--                                                                        -->
+<!-- @author vincent.hardy@eng.sun.com                                      -->
+<!-- @version $Id$        -->
+<!-- ====================================================================== -->
 
 <svg width="450" height="500" viewBox="0 0 450 500"
      xmlns="http://www.w3.org/2000/svg" 
diff --git a/samples/extensions/star.svg b/samples/extensions/star.svg
index 92154ee..e53e4e3 100644
--- a/samples/extensions/star.svg
+++ b/samples/extensions/star.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ====================================================================== -->
diff --git a/samples/extensions/xsl/nodata.xsl b/samples/extensions/xsl/nodata.xsl
index 3d7ec3d..2685330 100644
--- a/samples/extensions/xsl/nodata.xsl
+++ b/samples/extensions/xsl/nodata.xsl
@@ -1,20 +1,29 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- ========================================================================= -->
-<!-- Copyright (C) The Apache Software Foundation. All rights reserved.        -->
-<!--                                                                           -->
-<!-- This software is published under the terms of the Apache Software License -->
-<!-- version 1.1, a copy of which has been included with this distribution in  -->
-<!-- the LICENSE file.                                                         -->
-<!-- ========================================================================= -->
+<!--
 
-<!-- ========================================================================= -->
-<!-- Courtesy of Max Froumentin. This document can be processed directly by    -->
-<!-- the Squiggle browser. This file as an empty xsl stylesheet, which means   -->
-<!-- that it applies to itself (no data).                                      -->
-<!--                                                                           -->
-<!-- @author vincent.hardy@eng.sun.com                                         -->
-<!-- @version $Id$                                                             -->
-<!-- ========================================================================= -->
+   Copyright 2000-2001,2003  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.
+   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.
+
+-->
+<!-- ====================================================================== -->
+<!-- Courtesy of Max Froumentin. This document can be processed directly by -->
+<!-- the Squiggle browser. This file as an empty xsl stylesheet, which      -->
+<!-- means that it applies to itself (no data).                             -->
+<!--                                                                        -->
+<!-- @author vincent.hardy@eng.sun.com                                      -->
+<!-- @version $Id$        -->
+<!-- ====================================================================== -->
 <?xml-stylesheet href="" type="text/xsl"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns="http://www.w3.org/2000/svg"
diff --git a/samples/solitaire/cards/default.svg b/samples/solitaire/cards/default.svg
index 29ef507..04ca11e 100644
--- a/samples/solitaire/cards/default.svg
+++ b/samples/solitaire/cards/default.svg
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 <!-- ====================================================================== -->
 <!-- A 52 card deck.  The face cards don't have faces :(                    -->
diff --git a/samples/solitaire/script/board.js b/samples/solitaire/script/board.js
index 71fef53..ee7f663 100644
--- a/samples/solitaire/script/board.js
+++ b/samples/solitaire/script/board.js
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2003,2005 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.
+ * 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.
+ */
 var svgns   = "http://www.w3.org/2000/svg";
 var xlinkns = "http://www.w3.org/1999/xlink";
 
diff --git a/samples/solitaire/script/card.js b/samples/solitaire/script/card.js
index d46c5ed..1d87af3 100644
--- a/samples/solitaire/script/card.js
+++ b/samples/solitaire/script/card.js
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2003,2005 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.
+ * 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.
+ */
 var svgns   = "http://www.w3.org/2000/svg";
 var xlinkns = "http://www.w3.org/1999/xlink";
 
diff --git a/samples/solitaire/script/deck.js b/samples/solitaire/script/deck.js
index 752a78b..30d926d 100644
--- a/samples/solitaire/script/deck.js
+++ b/samples/solitaire/script/deck.js
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2003,2005 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.
+ * 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.
+ */
 function Deck(doc, numDecks, deck, w, h) {
   this.deck = deck;
   this.cards = new Array(numDecks*52);
diff --git a/samples/solitaire/script/util.js b/samples/solitaire/script/util.js
index 0242b1b..b2a51d2 100644
--- a/samples/solitaire/script/util.js
+++ b/samples/solitaire/script/util.js
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2003,2005 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.
+ * 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.
+ */
 
 function screenCTM(elem) {
     if (elem.getScreenCTM)
diff --git a/samples/tests/resources/images/svgCursor.svg b/samples/tests/resources/images/svgCursor.svg
index b2366d6..19fb385 100644
--- a/samples/tests/resources/images/svgCursor.svg
+++ b/samples/tests/resources/images/svgCursor.svg
@@ -14,15 +14,15 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
--->

-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  

-     id="body" width="32" height="32" viewBox="0 0 32 32" >

-

-    <rect x="0" y="0" width="32" height="32" fill="black" />

-    <rect x="2" y="2" width="28" height="28" fill="white" />

-    <rect x="15" y="0" width="2" height="32" fill="black" />

-    <rect y="15" x="0" width="32" height="2" fill="black" />

-    <rect x="12" y="12" width="8" height="8" fill="crimson" />

-    <rect x="5" y="20" width="22" height="10" fill="white" />

-    <text x="15.5" y="29" font-family="sans-serif" font-size="8" text-anchor="middle">SVG</text>

-</svg>

+-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  
+     id="body" width="32" height="32" viewBox="0 0 32 32" >
+
+    <rect x="0" y="0" width="32" height="32" fill="black" />
+    <rect x="2" y="2" width="28" height="28" fill="white" />
+    <rect x="15" y="0" width="2" height="32" fill="black" />
+    <rect y="15" x="0" width="32" height="2" fill="black" />
+    <rect x="12" y="12" width="8" height="8" fill="crimson" />
+    <rect x="5" y="20" width="22" height="10" fill="white" />
+    <text x="15.5" y="29" font-family="sans-serif" font-size="8" text-anchor="middle">SVG</text>
+</svg>
diff --git a/samples/tests/resources/images/svgCursor4.svg b/samples/tests/resources/images/svgCursor4.svg
index b9cb114..b9ae869 100644
--- a/samples/tests/resources/images/svgCursor4.svg
+++ b/samples/tests/resources/images/svgCursor4.svg
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  
      id="body"  width="300" height="300" viewBox="0 0 32 16" preserveAspectRatio="xMidYMid meet">
diff --git a/samples/tests/resources/java/sources/com/test/script/EventListenerInitializerImpl.java b/samples/tests/resources/java/sources/com/test/script/EventListenerInitializerImpl.java
index ee27306..fbafd79 100755
--- a/samples/tests/resources/java/sources/com/test/script/EventListenerInitializerImpl.java
+++ b/samples/tests/resources/java/sources/com/test/script/EventListenerInitializerImpl.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2003,2005 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.
+ * 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 com.test.script;
 
diff --git a/samples/tests/resources/java/sources/com/untrusted/script/UntrustedScriptHandler.java b/samples/tests/resources/java/sources/com/untrusted/script/UntrustedScriptHandler.java
index 181671c..86e3276 100644
--- a/samples/tests/resources/java/sources/com/untrusted/script/UntrustedScriptHandler.java
+++ b/samples/tests/resources/java/sources/com/untrusted/script/UntrustedScriptHandler.java
@@ -1,53 +1,20 @@
 /*
 
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
+   Copyright 1999-2003 The Apache Software Foundation 
 
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+   Licensed 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
 
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
+       http://www.apache.org/licenses/LICENSE-2.0
 
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
+   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.
 
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
+ */
 package com.untrusted.script;
 
 import org.apache.batik.script.ScriptHandler;
diff --git a/samples/tests/resources/script/rhinoSecurity.js b/samples/tests/resources/script/rhinoSecurity.js
index 97a372b..0441ae9 100644
--- a/samples/tests/resources/script/rhinoSecurity.js
+++ b/samples/tests/resources/script/rhinoSecurity.js
@@ -1,11 +1,20 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.        *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in  *
- * the LICENSE file.                                                         *
- *****************************************************************************/
+/*
 
+   Copyright 2002 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.
+   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.
+
+ */
 /**
  * This ECMA Script file represents an example of untrusted code.
  *
diff --git a/samples/tests/resources/script/scrollbar.js b/samples/tests/resources/script/scrollbar.js
index d95c071..a79ee30 100644
--- a/samples/tests/resources/script/scrollbar.js
+++ b/samples/tests/resources/script/scrollbar.js
@@ -1,10 +1,20 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.        *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in  *
- * the LICENSE file.                                                         *
- *****************************************************************************/
+/*
+
+   Copyright 2002 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.
+   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.
+
+ */
 
 var svgNS = "http://www.w3.org/2000/svg";
 var xlinkNS = "http://www.w3.org/1999/xlink";
diff --git a/samples/tests/resources/svg/defs2.svg b/samples/tests/resources/svg/defs2.svg
index 3c0d580..04f5f77 100644
--- a/samples/tests/resources/svg/defs2.svg
+++ b/samples/tests/resources/svg/defs2.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/color/systemColors.svg b/samples/tests/spec/color/systemColors.svg
index eb58b1b..8cba86f 100644
--- a/samples/tests/spec/color/systemColors.svg
+++ b/samples/tests/spec/color/systemColors.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/coordinates/percentagesAndUnits.svg b/samples/tests/spec/coordinates/percentagesAndUnits.svg
index 0d7f877..3a147e9 100644
--- a/samples/tests/spec/coordinates/percentagesAndUnits.svg
+++ b/samples/tests/spec/coordinates/percentagesAndUnits.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/filters/svgEnableBackground.svg b/samples/tests/spec/filters/svgEnableBackground.svg
index ebd599a..c35c56d 100644
--- a/samples/tests/spec/filters/svgEnableBackground.svg
+++ b/samples/tests/spec/filters/svgEnableBackground.svg
@@ -3,53 +3,19 @@
     "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" >
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/fonts/fontStyling.svg b/samples/tests/spec/fonts/fontStyling.svg
index 24b07ba..e91290f 100644
--- a/samples/tests/spec/fonts/fontStyling.svg
+++ b/samples/tests/spec/fonts/fontStyling.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/linking/pointerEvents2.svg b/samples/tests/spec/linking/pointerEvents2.svg
index 4cf15e1..3960bb0 100644
--- a/samples/tests/spec/linking/pointerEvents2.svg
+++ b/samples/tests/spec/linking/pointerEvents2.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/masking/maskRegions.svg b/samples/tests/spec/masking/maskRegions.svg
index 8f72632..3998344 100644
--- a/samples/tests/spec/masking/maskRegions.svg
+++ b/samples/tests/spec/masking/maskRegions.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/painting/visibility.svg b/samples/tests/spec/painting/visibility.svg
index be4445a..9aa35c9 100644
--- a/samples/tests/spec/painting/visibility.svg
+++ b/samples/tests/spec/painting/visibility.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/paints/radialGradientOrientation.svg b/samples/tests/spec/paints/radialGradientOrientation.svg
index e2ac192..b382c0c 100644
--- a/samples/tests/spec/paints/radialGradientOrientation.svg
+++ b/samples/tests/spec/paints/radialGradientOrientation.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/rendering/paintOpacity.svg b/samples/tests/spec/rendering/paintOpacity.svg
index 0f96abf..eff2270 100644
--- a/samples/tests/spec/rendering/paintOpacity.svg
+++ b/samples/tests/spec/rendering/paintOpacity.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/scripting/addDescOnClick.svg b/samples/tests/spec/scripting/addDescOnClick.svg
new file mode 100644
index 0000000..9dfc261
--- /dev/null
+++ b/samples/tests/spec/scripting/addDescOnClick.svg
@@ -0,0 +1,161 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+
+<!--
+
+   Copyright 2005  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.
+   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.
+
+-->
+<!-- ====================================================================== -->
+<!-- Append/Remove desc/title test                                          -->
+<!--                                                                        -->
+<!-- @author deweese@apache.org                                             -->
+<!-- @version $Id$ -->
+<!-- ====================================================================== -->
+
+<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>  
+
+<svg xmlns="http://www.w3.org/2000/svg" 
+     xmlns:xlink="http://www.w3.org/1999/xlink"
+     id="body" width="450" height="500" viewBox="0 0 450 500">
+
+    <title>Add Desc element "onClick"</title>
+
+    <text x="50%" y="45" class="title">Add Desc element "onClick"</text>
+
+    <script type="text/ecmascript">
+
+    var svgNamespaceURI = "http://www.w3.org/2000/svg";
+
+    function addChild(evt, tag) {
+        var r = evt.target;
+        var document = r.ownerDocument;
+        var e = document.createElementNS(svgNamespaceURI, tag);
+        e.appendChild(document.createTextNode("Dynamic: " + tag));
+        r.appendChild(e);
+    }
+
+    var desc  = document.getElementById("foo");
+    var newD = document.createTextNode("Text 1");
+    var oldD = desc.firstChild;
+
+    function toggleDesc() {
+       desc.replaceChild(newD, oldD);
+       var tmp = newD; newD=oldD; oldD=tmp;
+       setTimeout("toggleDesc()", 1000);
+    }
+
+    var title  = document.getElementById("bar");
+    var newT = document.createTextNode("Title 2");
+    var oldT = title.firstChild;
+
+    function toggleTitle() {
+       title.replaceChild(newT, oldT);
+       var tmp = newT; newT=oldT; oldT=tmp;
+       setTimeout("toggleTitle()", 1000);
+    }
+
+    toggleDesc();
+    toggleTitle();
+
+    var elT = document.getElementById("title");
+    var tglTitle = elT.firstChild;
+    var elD = document.getElementById("desc");
+    var tglDesc = elD.firstChild;
+
+    function toggleShowTitle() {
+      if (elT.firstChild) 
+         elT.removeChild(tglTitle);
+      else
+         elT.appendChild(tglTitle);
+       setTimeout("toggleShowTitle()", 1000);
+    }
+    function toggleShowDesc() {
+      if (elD.firstChild) 
+         elD.removeChild(tglDesc);
+      else
+         elD.appendChild(tglDesc);
+       setTimeout("toggleShowDesc()", 1000);
+    }
+
+    toggleShowDesc();
+    toggleShowTitle();
+
+    var elT2 = document.getElementById("title2");
+    var tglTitle2 = elT2.firstChild;
+    var elD2 = document.getElementById("desc2");
+    var tglDesc2 = elD2.firstChild;
+
+    function toggleShowTitle2() {
+      if (tglTitle2.parentNode == elT2) 
+         elT2.removeChild(tglTitle2);
+      else
+         elT2.appendChild(tglTitle2);
+       setTimeout("toggleShowTitle2()", 1000);
+    }
+    function toggleShowDesc2() {
+      if (tglDesc2.parentNode == elD2) 
+         elD2.removeChild(tglDesc2);
+      else
+         elD2.appendChild(tglDesc2);
+       setTimeout("toggleShowDesc2()", 1000);
+    }
+
+    toggleShowDesc2();
+    toggleShowTitle2();
+    </script>
+
+    <g>
+       <rect x="30"  y="75" width="75" height="75" style="fill:crimson"
+             onclick="addChild(evt, 'desc')"/>
+
+       <rect x="135" y="75" width="75" height="75" style="fill:gold"
+             onclick="addChild(evt, 'title')"/>
+
+       <rect x="240" y="75" width="75" height="75" style="fill:crimson"
+             onclick="addChild(evt, 'desc')"
+          ><title>Pre Existing Title</title></rect>
+
+       <rect x="345" y="75" width="75" height="75" style="fill:gold"
+             onclick="addChild(evt, 'title')"
+          ><desc>Pre Existing Desc</desc></rect>
+
+
+       <rect id="title" x="30" y="180" width="75" height="75" 
+             style="fill:crimson"><title>Pre Existing Title</title></rect>
+
+       <rect id="desc" x="135" y="180" width="75" height="75" 
+             style="fill:gold"><desc>Pre-existing Desc</desc></rect>
+
+       <rect id="title2" x="240" y="180" width="75" height="75" 
+          style="fill:crimson"><title>Pre Existing Title</title>
+                               <desc>A constant Desc</desc></rect>
+
+       <rect id="desc2" x="345" y="180" width="75" height="75" 
+             style="fill:gold"><desc>Pre-existing Desc</desc>
+                               <title>A constant title</title></rect>
+
+
+       <rect x="30" y="285" width="75" height="75" style="fill:crimson"
+          ><title>Pre Existing Title</title
+          ><desc id="foo">Text 2</desc></rect>
+
+       <rect x="135" y="285" width="75" height="75" style="fill:gold"
+          ><title id="bar">Title 1</title
+          ><desc >Pre-existing Desc</desc></rect>
+
+    </g>
+</svg>
diff --git a/samples/tests/spec/scripting/getElementById.svg b/samples/tests/spec/scripting/getElementById.svg
new file mode 100644
index 0000000..5d2c5ea
--- /dev/null
+++ b/samples/tests/spec/scripting/getElementById.svg
@@ -0,0 +1,183 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+
+<!--
+
+   Copyright 2005  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.
+   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.
+
+-->
+<!-- ====================================================================== -->
+<!-- Test of the getElementById method                                      -->
+<!--                                                                        -->
+<!-- @author deweese@apache.org                                             -->
+<!-- @version $Id$ -->
+<!-- ====================================================================== -->
+
+<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>  
+
+<svg id="body" width="450" height="500" viewBox="0 0 450 500"
+     onload="doTest()"
+     xmlns="http://www.w3.org/2000/svg" 
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+
+   <title>Test of 'getElementById' method</title>
+
+   <text x="50%" y="45" class="title">Test of 'getElementById' method</text>
+
+   <script type="text/ecmascript">
+      var svgns = "http://www.w3.org/2000/svg";
+
+      function setText(id, text, color) {
+         var tspan = document.getElementById(id);
+         tspan.appendChild(document.createTextNode(text));
+         tspan.setAttribute("fill", color);
+      }
+      function checkTest(e, base, id, tId) {
+         if (e == base.getElementById(id)) 
+            setText(tId, "success", "green");
+         else
+            setText(tId, "failed", "red");
+      }
+      function doTest() {
+         var g   = document.getElementById("group");
+         var id1 = g.firstChild;
+         var id2 = id1.nextSibling;
+         var id3 = id2.nextSibling;
+         var id4 = id3.nextSibling;
+         var svg1 = id4.nextSibling;
+         var id5 = svg1.firstChild;
+         var id6 = id5.nextSibling;
+         var id7 = svg1.nextSibling;
+
+         checkTest(id1, document, "id1", "t1");
+         checkTest(id2, document, "id2", "t2");
+         checkTest(null, document, "undefined", "t3");
+
+         checkTest(svg1, document, "svg1", "t4");
+         checkTest(svg1, svg1, "svg1", "t5");
+
+         checkTest(id5, document, "id5", "t6");
+         checkTest(id5, svg1, "id5", "t7");
+         checkTest(id6, svg1, "id6", "t8");
+         checkTest(id7, svg1, "id7", "t9");
+
+         id2.setAttribute("id", "d1");
+         checkTest(id2, document, "d1", "t10");
+
+         var attr = document.createAttribute("id");
+         attr.setValue("d2");
+         id3.setAttributeNode(attr);
+         checkTest(id3, document, "d2", "t11");
+         checkTest(null, document, "id3", "t12");
+         attr.setValue("d3");
+         checkTest(id3, document, "d3", "t13");
+
+         id4.removeAttribute("id");
+         checkTest(null, document, "id4", "t14");
+
+         svg1.parentNode.removeChild(svg1);
+         checkTest(null, document, "id5", "t15");
+         checkTest(id5, svg1, "id5", "t16");
+
+         var svg2 = document.createElementNS(svgns, "svg");
+         var id8  = document.createElementNS(svgns, "desc");
+         svg2.appendChild(id8);
+         id8.setAttribute("id", "id8");
+         checkTest(null, document, "id8", "t17");
+         checkTest(null, svg1, "id8", "t18");
+         checkTest(id8,  svg2, "id8", "t19");
+
+         var id9  = document.createElementNS(svgns, "desc");
+         id9.setAttribute("id", "id9");
+         svg2.appendChild(id9);
+         checkTest(null, document, "id9", "t20");
+         checkTest(null, svg1, "id9", "t21");
+         checkTest(id9,  svg2, "id9", "t22");
+
+         var id5_2 = id5.cloneNode(true);
+         g.appendChild(id5_2);
+         checkTest(id5_2, document, "id5", "t23");
+      }
+   </script>
+
+   <g id="group"><rect id="id1" x="10" y="60" width="50" height="50"
+            fill="gold" stroke="black"
+      /><rect id="id2" x="70" y="60" width="50" height="50"
+            fill="crimson" stroke="black"
+      /><rect id="id3" x="130" y="60" width="50" height="50"
+            fill="gold" stroke="black"
+      /><rect id="id4" x="190" y="60" width="50" height="50"
+            fill="crimson" stroke="black"
+      /><svg id="svg1" x="0" y="0" width="450" height="500"
+         ><rect id="id5" x="250" y="60" width="50" height="50"
+               fill="gold" stroke="black"
+         /><rect id="id6" x="310" y="60" width="50" height="50"
+               fill="crimson" stroke="black"
+      /></svg><rect id="id7" x="370" y="60" width="50" height="50"
+                    fill="gold" stroke="black"/>
+
+      <text x="60" y="140" text-anchor="end"
+       >Test 1: <tspan id="t1" x="65" text-anchor="start"/></text>
+      <text x="60" y="160" text-anchor="end"
+       >Test 2: <tspan id="t2" x="65" text-anchor="start"/></text>
+      <text x="60" y="180" text-anchor="end"
+       >Test 3: <tspan id="t3" x="65" text-anchor="start"/></text>
+      <text x="60" y="200" text-anchor="end"
+       >Test 4: <tspan id="t4" x="65" text-anchor="start"/></text>
+      <text x="60" y="220" text-anchor="end"
+       >Test 5: <tspan id="t5" x="65" text-anchor="start"/></text>
+
+      <text x="60" y="240" text-anchor="end"
+       >Test 6: <tspan id="t6" x="65" text-anchor="start"/></text>
+      <text x="60" y="260" text-anchor="end"
+       >Test 7: <tspan id="t7" x="65" text-anchor="start"/></text>
+      <text x="60" y="280" text-anchor="end"
+       >Test 8: <tspan id="t8" x="65" text-anchor="start"/></text>
+      <text x="60" y="300" text-anchor="end"
+       >Test 9: <tspan id="t9" x="65" text-anchor="start"/></text>
+      <text x="60" y="320" text-anchor="end"
+       >Test 10: <tspan id="t10" x="65" text-anchor="start"/></text>
+
+      <text x="60" y="340" text-anchor="end"
+       >Test 11: <tspan id="t11" x="65" text-anchor="start"/></text>
+
+
+      <text x="220" y="140" text-anchor="end"
+       >Test 12: <tspan id="t12" x="225" text-anchor="start"/></text>
+      <text x="220" y="160" text-anchor="end"
+       >Test 13: <tspan id="t13" x="225" text-anchor="start"/></text>
+      <text x="220" y="180" text-anchor="end"
+       >Test 14: <tspan id="t14" x="225" text-anchor="start"/></text>
+      <text x="220" y="200" text-anchor="end"
+       >Test 15: <tspan id="t15" x="225" text-anchor="start"/></text>
+      <text x="220" y="220" text-anchor="end"
+       >Test 16: <tspan id="t16" x="225" text-anchor="start"/></text>
+      <text x="220" y="240" text-anchor="end"
+       >Test 17: <tspan id="t17" x="225" text-anchor="start"/></text>
+      <text x="220" y="260" text-anchor="end"
+       >Test 18: <tspan id="t18" x="225" text-anchor="start"/></text>
+      <text x="220" y="280" text-anchor="end"
+       >Test 19: <tspan id="t19" x="225" text-anchor="start"/></text>
+      <text x="220" y="300" text-anchor="end"
+       >Test 20: <tspan id="t20" x="225" text-anchor="start"/></text>
+      <text x="220" y="320" text-anchor="end"
+       >Test 21: <tspan id="t21" x="225" text-anchor="start"/></text>
+      <text x="220" y="340" text-anchor="end"
+       >Test 22: <tspan id="t22" x="225" text-anchor="start"/></text>
+      <text x="220" y="360" text-anchor="end"
+       >Test 23: <tspan id="t23" x="225" text-anchor="start"/></text>
+   </g>
+</svg>
diff --git a/samples/tests/spec/scripting/paintType.svg b/samples/tests/spec/scripting/paintType.svg
new file mode 100644
index 0000000..571d4d4
--- /dev/null
+++ b/samples/tests/spec/scripting/paintType.svg
@@ -0,0 +1,141 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+
+<!--
+
+   Copyright 2005  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.
+   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.
+
+-->
+<!-- ====================================================================== -->
+<!-- Test of paintType DOM interface                                        -->
+<!--                                                                        -->
+<!-- @author deweese@apache.org                                             -->
+<!-- @version $Id$ -->
+<!-- ====================================================================== -->
+
+<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>  
+
+<svg id="body" width="450" height="500" viewBox="0 0 450 500"
+     onload="doTest()"
+     xmlns="http://www.w3.org/2000/svg" 
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+
+   <title>Test of paintType DOM interface</title>
+
+   <text x="50%" y="45" class="title">Test of paintType DOM interface</text>
+
+   <script type="text/ecmascript">
+      var svgNamespaceURI = "http://www.w3.org/2000/svg";
+      var UNKNOWN               = 0;
+      var RGBCOLOR              = 1;
+      var RGBCOLOR_ICCCOLOR     = 2;
+      var NONE                  = 101;
+      var CURRENTCOLOR          = 102;
+      var URI_NONE              = 103;
+      var URI_CURRENTCOLOR      = 104;
+      var URI_RGBCOLOR          = 105;
+      var URI_RGBCOLOR_ICCCOLOR = 106;
+      var URI                   = 107;
+
+      function getType(id, attr) {
+        var e = document.getElementById(id);
+        var pa = e.getPresentationAttribute(attr);
+        var pt = pa.paintType;
+        var txt;
+        if      (pt == UNKNOWN)               txt="UNKNOWN";
+        else if (pt == RGBCOLOR)              txt="RGBCOLOR";
+        else if (pt == RGBCOLOR_ICCCOLOR)     txt="RGBCOLOR_ICCCOLOR";
+        else if (pt == NONE)                  txt="NONE";
+        else if (pt == CURRENTCOLOR)          txt="CURRENTCOLOR";
+        else if (pt == URI_NONE)              txt="URI_NONE";
+        else if (pt == URI_CURRENTCOLOR)      txt="URI_CURRENTCOLOR";
+        else if (pt == URI_RGBCOLOR)          txt="URI_RGBCOLOR";
+        else if (pt == URI_RGBCOLOR_ICCCOLOR) txt="URI_RGBCOLOR_ICCCOLOR";
+        else if (pt == URI)                   txt="URI";
+        else                                  txt="Unknown paint type";
+
+        e = document.getElementById("text."+id);
+        e.appendChild(document.createTextNode(txt));
+      }
+
+      function doTest() {
+         getType("r1", "fill");
+         getType("r2", "fill");
+         getType("r3", "fill");
+         getType("r4", "fill");
+         getType("r5", "fill");
+         getType("r6", "fill");
+         getType("r7", "fill");
+         getType("r8", "fill");
+         getType("r9", "fill");
+         getType("r10", "fill");
+         getType("r11", "fill");
+         getType("r12", "fill");
+      }
+   </script>
+
+   <linearGradient id="lg" spreadMethod="repeat">
+      <stop offset="0" stop-color="gold" />
+      <stop offset="1" stop-color="crimson" />
+   </linearGradient>
+
+   <color-profile name="changeColorAuto" 
+                  rendering-intent="auto"
+                  xlink:href="../../resources/icc/changeColor.icm"/>
+
+   <g color="green" text-anchor="middle">
+      <rect id="r1" x="30"  y="80" height="75" width="75" fill="#F00"/>
+      <rect id="r2" x="135" y="80" height="75" width="75" fill="gold"/>
+      <rect id="r3" x="240" y="80" height="75" width="75" fill="currentColor"/>
+      <rect id="r4" x="345" y="80" height="75" width="75" fill="url(#lg)"/>
+
+      <text id="text.r1" x="67.5"  y="170"/>
+      <text id="text.r2" x="172.5" y="185"/>
+      <text id="text.r3" x="277.5" y="170"/>
+      <text id="text.r4" x="382.5" y="185"/>
+
+
+      <rect id="r5" x="30"  y="195" height="75" width="75" 
+            fill="none" stroke="black"/>
+      <rect id="r6" x="135" y="195" height="75" width="75" 
+            fill="gold icc-color(changeColorAuto, 0.702, 0.2745, 0.098)"/>
+      <rect id="r7" x="240" y="195" height="75" width="75" 
+            fill="url(#lg) none"/>
+      <rect id="r8" x="345" y="195" height="75" width="75" 
+            fill="url(#lg) gold"/>
+
+      <text id="text.r5" x="67.5"  y="290"/>
+      <text id="text.r6" x="172.5" y="305"/>
+      <text id="text.r7" x="277.5" y="290"/>
+      <text id="text.r8" x="382.5" y="305"/>
+
+
+      <rect id="r9" x="30"  y="320" height="75" width="75" 
+            fill="url(#lg) currentColor"/>
+      <rect id="r10" x="135" y="320" height="75" width="75" 
+       fill="url(#lg) gold icc-color(changeColorAuto, 0.702, 0.2745, 0.098)"/>
+      <rect id="r11" x="240" y="320" height="75" width="75" 
+            fill="url(#no_such_uri) gold"/>
+      <rect id="r12" x="345" y="320" height="75" width="75" 
+            fill="url(#no_such_uri) currentColor"/>
+
+      <text id="text.r9" x="67.5"  y="415"/>
+      <text id="text.r10" x="172.5" y="430"/>
+      <text id="text.r11" x="277.5" y="415"/>
+      <text id="text.r12" x="382.5" y="430"/>
+
+   </g>
+</svg>
\ No newline at end of file
diff --git a/samples/tests/spec/scripting/pathLength.svg b/samples/tests/spec/scripting/pathLength.svg
new file mode 100644
index 0000000..8582fbd
--- /dev/null
+++ b/samples/tests/spec/scripting/pathLength.svg
@@ -0,0 +1,121 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+
+<!--
+
+   Copyright 2005  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.
+   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.
+
+-->
+<!-- ====================================================================== -->
+<!-- Test of getPathLength, and getPointAtLength interfaces.                -->
+<!--                                                                        -->
+<!-- @author deweese@apache.org                                             -->
+<!-- @version $Id$ -->
+<!-- ====================================================================== -->
+
+<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>  
+
+<svg id="body" width="450" height="500" viewBox="0 0 450 500"
+  onload="load(evt)"
+     xmlns="http://www.w3.org/2000/svg" 
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+
+   <title>Test getPathLength and getPointAtLength interfaces</title>
+
+   <text x="50%" y="40" class="title"
+    >Test getPathLength and getPointAtLength interfaces</text>
+
+   <style type="text/css"><![CDATA[
+     text { stroke: none }
+     circle { stroke: none }
+     path   { fill:none }
+]]></style>
+
+   <script type="text/ecmascript">
+    var svgNamespaceURI = "http://www.w3.org/2000/svg";
+    var doc;
+
+    function doLength(cnt, dist) {
+      var p = doc.getElementById("p"+cnt);
+      var l = doc.getElementById("l"+cnt);
+      var c = doc.getElementById("c"+cnt);
+
+      var len, pt;
+      len = p.getTotalLength();
+      pt  = p.getPointAtLength(dist);
+      l.appendChild(doc.createTextNode(("Len: " + len).substring(0, 10)));
+      c.setAttribute("cx", ""+pt.getX());
+      c.setAttribute("cy", ""+pt.getY());
+    }
+
+    function load(evt) {
+      doc = evt.target.getOwnerDocument();
+      doLength(1, 25);
+      doLength(2, 25);
+      doLength(3, 25);
+      doLength(4, 25);
+      doLength(5, 25);
+      doLength(6, 25);
+      doLength(7, (78.546)/2);
+      doLength(8, 25);
+
+    }
+   </script>
+
+   <g stroke="black">
+      <path id="p1" d="M 20,60 h 50"/>  
+      <text id="l1" x="80" y="65"/>
+      <circle cx="45" cy="60" r="3" fill="red"/>
+      <circle id="c1" cx="0" cy="0" r="1" fill="black"/>
+
+      <path id="p2" d="M 20,60 l 40,30"/>
+      <text id="l2" x="70" y="95"/>
+      <circle cx="40" cy="75" r="3" fill="red"/>
+      <circle id="c2" cx="0" cy="0" r="1" fill="black"/>
+
+      <path id="p3" d="M 20,60 v 50"/>
+      <text id="l3" x="30" y="115"/>
+      <circle cx="20" cy="85" r="3" fill="red"/>
+      <circle id="c3" cx="0" cy="0" r="1" fill="black"/>
+
+      <path id="p4" d="M 170,60 c 15 0 35 0 50 0"/>
+      <text id="l4" x="230" y="65"/>
+      <circle cx="195" cy="60" r="3" fill="red"/>
+      <circle id="c4" cx="0" cy="0" r="1" fill="black"/>
+
+      <path id="p5" d="M 170,60 c 15 0 30 0 30,40"/>
+      <text id="l5" x="210" y="105"/>
+      <circle cx="192.8" cy="67.3" r="3" fill="red"/>
+      <circle id="c5" cx="0" cy="0" r="1" fill="black"/>
+
+      <path id="p6" d="M 20,170 a 10 0 0 0 0 50 0"/>
+      <text id="l6" x="80" y="175"/>
+      <circle cx="45" cy="170" r="3" fill="red"/>
+      <circle id="c6" cx="0" cy="0" r="1" fill="black"/>
+
+      <path id="p7" d="M 20,170 a 10 10 0 0 0 50 0"/>
+      <text id="l7" x="80" y="195"/>
+      <circle cx="45" cy="195" r="3" fill="red"/>
+      <circle id="c7" cx="0" cy="0" r="1" fill="black"/>
+
+      <path id="p8" d="M 170,170 v10h10v-10h10v10"/>
+      <text id="l8" x="200" y="180"/>
+      <circle cx="180" cy="175" r="3" fill="red"/>
+      <circle id="c8" cx="0" cy="0" r="1" fill="black"/>
+
+
+   </g>
+</svg>
\ No newline at end of file
diff --git a/samples/tests/spec/scripting/security2.jar b/samples/tests/spec/scripting/security2.jar
index 86d450c..df1c8d5 100644
--- a/samples/tests/spec/scripting/security2.jar
+++ b/samples/tests/spec/scripting/security2.jar
Binary files differ
diff --git a/samples/tests/spec/scripting/svgFontMove.svg b/samples/tests/spec/scripting/svgFontMove.svg
new file mode 100644
index 0000000..59037a1
--- /dev/null
+++ b/samples/tests/spec/scripting/svgFontMove.svg
@@ -0,0 +1,65 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN"
+"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">
+
+<!--
+
+   Copyright 2003  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.
+   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.
+
+-->
+<!-- ====================================================================== -->
+<!-- Modification of a circle attributes                                    -->
+<!--                                                                        -->
+<!-- @author tkormann@ilog.fr                                               -->
+<!-- @version $Id$ -->
+<!-- ====================================================================== -->
+
+<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>  
+
+<svg id="body" width="450" height="500" viewBox="0 0 450 500"
+     xmlns="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+
+   <title>Testing script updates of SVG Font text.</title>
+   <text x="50%" y="45" class="title"
+    >Testing script updates of SVG Font text.</text>
+
+   <font-face font-family="stroke">
+      <font-face-src>
+         <font-face-uri xlink:href="../../../strokeFont.svg#strokeB"/>
+      </font-face-src>     
+   </font-face>
+
+   <script type="text/ecmascript"><![CDATA[
+        var inRegard=false;
+        function moveText() {
+          var t = document.getElementById("txt");
+          t.setAttribute("x", "225");
+          if (inRegard) 
+               setTimeout('regardTestInstance.scriptDone()', 100);
+	}
+       function regardStart() {
+          inRegard = true;
+          moveText();
+       }
+    ]]></script>
+
+   <g id="test-content">
+      <text id="txt" font-family="stroke" font-size="25" text-anchor="middle" 
+            x="200" y="250" onclick="moveText()">SVG Font Text</text>
+   </g>
+
+</svg>
+
diff --git a/samples/tests/spec/scripting/textcontent/numberOfChars.svg b/samples/tests/spec/scripting/textcontent/numberOfChars.svg
index 04141bb..5e3e82e 100644
--- a/samples/tests/spec/scripting/textcontent/numberOfChars.svg
+++ b/samples/tests/spec/scripting/textcontent/numberOfChars.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/shapes/zero.svg b/samples/tests/spec/shapes/zero.svg
index 8eedc15..c2481f8 100644
--- a/samples/tests/spec/shapes/zero.svg
+++ b/samples/tests/spec/shapes/zero.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/tests/spec/structure/xmlBaseStyling.svg b/samples/tests/spec/structure/xmlBaseStyling.svg
index 373843e..10cc0ae 100644
--- a/samples/tests/spec/structure/xmlBaseStyling.svg
+++ b/samples/tests/spec/structure/xmlBaseStyling.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ====================================================================== -->
diff --git a/samples/tests/spec/styling/important.svg b/samples/tests/spec/styling/important.svg
new file mode 100644
index 0000000..2c7301e
--- /dev/null
+++ b/samples/tests/spec/styling/important.svg
@@ -0,0 +1,73 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+
+<!--
+
+   Copyright 1999-2003  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.
+   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.
+
+-->
+
+<!-- ====================================================================== -->
+<!-- Test of the style element                                              -->
+<!--                                                                        -->
+<!-- @author tkormann@ilog.fr                                               -->
+<!-- @version $Id$ -->
+<!-- ====================================================================== -->
+
+<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>  
+
+<svg id="body" width="450" height="500" viewBox="0 0 450 500"
+     xmlns="http://www.w3.org/2000/svg" 
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+
+  <title>Test of CSS !important properties.</title>
+  <text x="50%" y="50" class="title"
+    >Test of CSS !important properties.</text>
+
+  <style type="text/css">
+     .t1 { fill: green !important; fill: red }
+     .t2 { fill: red !important; fill: green !important }
+     .t3 { fill: yellow; }
+     g > rect { fill: green !important; }
+
+     .t4 { fill: green !important; }
+     g > g > rect { fill: red !important; }
+     text { text-anchor: middle; }
+  </style>
+
+  <rect class="t1" x="25"  y="75"  width="100" height="100" fill="blue"/>
+  <text x="75" y="205">fill: green !important; fill: red</text>
+  <rect class="t2" x="175" y="75"  width="100" height="100" fill="blue"/>
+  <text x="225" y="190">fill: red !important; fill: green !important</text>
+  <rect x="325" y="75"  width="100" height="100" 
+        fill="blue" style="fill:green"/>
+  <text x="375" y="205">fill="blue" style="fill:green"</text>
+
+  <rect class="t1" x="25"  y="250" width="100" height="100" 
+        fill="blue" style="fill: purple"/>
+  <text x="75" y="365">fill: green !important; fill: red</text>
+<g>
+  <rect class="t3" x="175" y="250" width="100" height="100" fill="red"/>
+  <text x="225" y="365">.t3 { fill: yellow; }<tspan x="225" dy="15"
+     >g &gt; rect { fill: green !important; }</tspan></text>
+  <g>
+    <rect class="t4" x="325" y="250" width="100" height="100" fill="blue"/>
+    <text x="360" y="400">.t4 { fill: green !important; }<tspan x="360" dy="15"
+       >g &gt; g &gt; rect { fill: red !important; }</tspan></text>
+  </g>
+</g>
+
+</svg>
\ No newline at end of file
diff --git a/samples/tests/spec/styling/styleElement.svg b/samples/tests/spec/styling/styleElement.svg
index c1e2692..5bf9873 100644
--- a/samples/tests/spec/styling/styleElement.svg
+++ b/samples/tests/spec/styling/styleElement.svg
@@ -4,56 +4,24 @@
 
 <!--
 
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
+   Copyright 1999-2003  The Apache Software Foundation 
 
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+   Licensed 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
 
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
+       http://www.apache.org/licenses/LICENSE-2.0
 
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
+   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.
 
 -->
 
 <!-- ====================================================================== -->
-<!-- Modification of a circle attributes                                    -->
+<!-- Test of the style element                                              -->
 <!--                                                                        -->
 <!-- @author tkormann@ilog.fr                                               -->
 <!-- @version $Id$ -->
diff --git a/samples/tests/spec/text/verticalTextOnPath.svg b/samples/tests/spec/text/verticalTextOnPath.svg
index 1cac4a1..e4cadc0 100644
--- a/samples/tests/spec/text/verticalTextOnPath.svg
+++ b/samples/tests/spec/text/verticalTextOnPath.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/samples/textRotateShadows.svg b/samples/textRotateShadows.svg
index da37305..3c83a19 100644
--- a/samples/textRotateShadows.svg
+++ b/samples/textRotateShadows.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/sources/org/apache/batik/apps/rasterizer/DestinationType.java b/sources/org/apache/batik/apps/rasterizer/DestinationType.java
index 9c51bd2..e5803de 100644
--- a/sources/org/apache/batik/apps/rasterizer/DestinationType.java
+++ b/sources/org/apache/batik/apps/rasterizer/DestinationType.java
@@ -80,8 +80,6 @@
     /**
      * Returns a transcoder object of the result image type.
      *
-     * @param type Type of the result image.
-     *
      * @return Transcoder object or <tt>null</tt> if there isn't a proper transcoder.
      */
     protected Transcoder getTranscoder(){
diff --git a/sources/org/apache/batik/apps/rasterizer/SVGConverter.java b/sources/org/apache/batik/apps/rasterizer/SVGConverter.java
index 51db5ef..698d40d 100644
--- a/sources/org/apache/batik/apps/rasterizer/SVGConverter.java
+++ b/sources/org/apache/batik/apps/rasterizer/SVGConverter.java
@@ -89,7 +89,7 @@
  * </ul>
  *
  * @version $Id$
- * @author <a href="Henri.Ruini@nokia.com">Henri Ruini</a>
+ * @author <a href="mailto:Henri.Ruini@nokia.com">Henri Ruini</a>
  * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
  */
 public class SVGConverter {
@@ -182,7 +182,7 @@
     /** SVG file extension */
     protected static final String SVG_EXTENSION = ".svg";
 
-    /** Default quality value. -1 means disabled*/
+    /** Default quality value.  A value of -1 means disabled. */
     protected static final float DEFAULT_QUALITY 
         = -1f;
 
@@ -627,7 +627,7 @@
     }
 
     /**
-     * Returns true if f is a File. f is found to be a file if
+     * Returns true if f is a File. <code>f</code> is found to be a file if
      * it exists and is a file. If it does not exist, it is declared
      * to be a file if it has the same extension as the DestinationType.
      */
diff --git a/sources/org/apache/batik/apps/rasterizer/SVGConverterException.java b/sources/org/apache/batik/apps/rasterizer/SVGConverterException.java
index aeb64af..a1db12d 100644
--- a/sources/org/apache/batik/apps/rasterizer/SVGConverterException.java
+++ b/sources/org/apache/batik/apps/rasterizer/SVGConverterException.java
@@ -20,7 +20,7 @@
 /**
  * Describes an error condition in <tt>SVGConverter</tt>
  *
- * @author <a href="vincent.hardy@sun.com">Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public class SVGConverterException extends Exception {
diff --git a/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java b/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java
index 2b8a585..fa799ca 100755
--- a/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java
+++ b/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java
@@ -124,6 +124,7 @@
 import org.apache.batik.transcoder.image.PNGTranscoder;
 import org.apache.batik.transcoder.image.TIFFTranscoder;
 import org.apache.batik.transcoder.print.PrintTranscoder;
+import org.apache.batik.transcoder.svg2svg.SVGTranscoder;
 import org.apache.batik.util.ParsedURL;
 import org.apache.batik.util.Service;
 import org.apache.batik.util.SVGConstants;
@@ -1330,10 +1331,13 @@
                                      svgDoc.getURL());
                             }
 
-                            // if (prettyPrint) {
-                            // } else {
+                            if (prettyPrint) {
+                                SVGTranscoder trans = new SVGTranscoder();
+                                trans.transcode(new TranscoderInput(svgDoc), 
+                                                new TranscoderOutput(writer));
+                            } else {
                                 DOMUtilities.writeDocument(svgDoc, writer);
-                                // }
+                            }
 
                             writer.close();
 
@@ -2738,12 +2742,12 @@
          * on the ExternalResourceSecurity strategy returned by 
          * getExternalResourceSecurity.
          *
-         * @param scriptURL url for the script, as defined in
-         *        the script's xlink:href attribute. If that
+         * @param resourceURL url for the script, as defined in
+         *        the resource's xlink:href attribute. If that
          *        attribute was empty, then this parameter should
          *        be null
          * @param docURL url for the document into which the 
-         *        script was found.
+         *        resource was found.
          */
         public void 
             checkLoadExternalResource(ParsedURL resourceURL,
diff --git a/sources/org/apache/batik/apps/svgbrowser/Main.java b/sources/org/apache/batik/apps/svgbrowser/Main.java
index 1e4f285..503ffbc 100755
--- a/sources/org/apache/batik/apps/svgbrowser/Main.java
+++ b/sources/org/apache/batik/apps/svgbrowser/Main.java
@@ -18,14 +18,15 @@
 package org.apache.batik.apps.svgbrowser;
 
 import java.awt.Dimension;
-import java.awt.Font;
 import java.awt.event.ActionEvent;
+import java.awt.Font;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileWriter;
-import java.io.IOException;
 import java.io.InputStreamReader;
+import java.io.IOException;
 import java.io.Reader;
+import java.io.UnsupportedEncodingException;
 import java.io.Writer;
 import java.net.Authenticator;
 import java.net.URLDecoder;
@@ -818,7 +819,8 @@
         StringBuffer lastVisitedBuffer = new StringBuffer();
 
         for (int i=0; i<lastVisited.size(); i++) {
-            lastVisitedBuffer.append(URLEncoder.encode(lastVisited.elementAt(i).toString()));
+            lastVisitedBuffer.append
+                (URLEncoder.encode(lastVisited.elementAt(i).toString()));
             lastVisitedBuffer.append(URI_SEPARATOR);
         }
         
@@ -864,7 +866,7 @@
         }
 
         for (int i=0; i<n; i++) {
-            lastVisited.addElement(URLDecoder.decode(st.nextToken()));
+                lastVisited.addElement(URLDecoder.decode(st.nextToken()));
         }
     }
 }
diff --git a/sources/org/apache/batik/apps/svgbrowser/SVGOptionPanel.java b/sources/org/apache/batik/apps/svgbrowser/SVGOptionPanel.java
index add0f91..337f1d6 100644
--- a/sources/org/apache/batik/apps/svgbrowser/SVGOptionPanel.java
+++ b/sources/org/apache/batik/apps/svgbrowser/SVGOptionPanel.java
@@ -54,7 +54,6 @@
             (resources.getString("SVGOptionPanel.PrettyPrint"));
         prettyPrintCB.setSelected
             (resources.getBoolean("SVGOptionPanel.PrettyPrintDefault"));
-        prettyPrintCB.setEnabled(false); // not supported yet.
         add(prettyPrintCB, BorderLayout.SOUTH);
     }
 
diff --git a/sources/org/apache/batik/apps/svgbrowser/StatusBar.java b/sources/org/apache/batik/apps/svgbrowser/StatusBar.java
index 9056610..25f4f4f 100644
--- a/sources/org/apache/batik/apps/svgbrowser/StatusBar.java
+++ b/sources/org/apache/batik/apps/svgbrowser/StatusBar.java
@@ -92,8 +92,7 @@
     protected DisplayThread displayThread;
 
     /**
-     * Creates a new status bar
-     * @param rm the resource manager that finds the message
+     * Creates a new status bar.
      */
     public StatusBar() {
         super(new BorderLayout(5, 5));
diff --git a/sources/org/apache/batik/apps/svgbrowser/ThumbnailDialog.java b/sources/org/apache/batik/apps/svgbrowser/ThumbnailDialog.java
index 45d23fc..c100289 100644
--- a/sources/org/apache/batik/apps/svgbrowser/ThumbnailDialog.java
+++ b/sources/org/apache/batik/apps/svgbrowser/ThumbnailDialog.java
@@ -35,6 +35,7 @@
 import java.awt.geom.NoninvertibleTransformException;
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
+import java.util.List;
 import java.util.Locale;
 import java.util.ResourceBundle;
 
@@ -53,6 +54,7 @@
 import org.apache.batik.swing.svg.SVGDocumentLoaderAdapter;
 import org.apache.batik.swing.svg.SVGDocumentLoaderEvent;
 import org.apache.batik.util.gui.resource.ResourceManager;
+import org.apache.batik.util.SVGConstants;
 import org.w3c.dom.svg.SVGDocument;
 import org.w3c.dom.svg.SVGSVGElement;
 
@@ -106,7 +108,8 @@
     /**
      * Constructs a new <tt>ThumbnailDialog</tt> for the specified canvas.
      *
-     * @param canvas the canvas that owns the SVG document to display
+     * @param owner the owner frame
+     * @param svgCanvas the canvas that owns the SVG document to display
      */
     public ThumbnailDialog(Frame owner, JSVGCanvas svgCanvas) {
         super(owner, resources.getString("Dialog.title"));
@@ -159,6 +162,9 @@
         if (!(gn instanceof CompositeGraphicsNode))
             return null;
         CompositeGraphicsNode cgn = (CompositeGraphicsNode)gn;
+        List children = cgn.getChildren();
+        if (children.size() == 0) 
+            return null;
         gn = (GraphicsNode)cgn.getChildren().get(0);
         if (!(gn instanceof CanvasGraphicsNode))
             return null;
@@ -174,9 +180,16 @@
             SVGSVGElement elt = svgDocument.getRootElement();
             Dimension dim = svgThumbnailCanvas.getSize();
 
-            AffineTransform Tx
-                = ViewBox.getViewTransform(null, elt, dim.width, dim.height);
-            if (Tx.isIdentity()) {
+            String viewBox = elt.getAttributeNS
+                (null, SVGConstants.SVG_VIEW_BOX_ATTRIBUTE);
+
+            AffineTransform Tx;
+            if (viewBox.length() != 0) {
+                String aspectRatio = elt.getAttributeNS
+                    (null, SVGConstants.SVG_PRESERVE_ASPECT_RATIO_ATTRIBUTE);
+                Tx = ViewBox.getPreserveAspectRatioTransform
+                    (elt, viewBox, aspectRatio, dim.width, dim.height);
+            }else {
                 // no viewBox has been specified, create a scale transform
                 Dimension2D docSize = svgCanvas.getSVGDocumentSize();
                 double sx = dim.width / docSize.getWidth();
@@ -187,13 +200,15 @@
 
             GraphicsNode gn = svgCanvas.getGraphicsNode();
             CanvasGraphicsNode cgn = getCanvasGraphicsNode(gn);
-            AffineTransform vTx = cgn.getViewingTransform();
-            if ((vTx != null) && !vTx.isIdentity()) {
-                try {
-                    AffineTransform invVTx = vTx.createInverse();
-                    Tx.concatenate(invVTx);
-                } catch (NoninvertibleTransformException nite) {
-                    /* nothing */
+            if (cgn != null) {
+                AffineTransform vTx = cgn.getViewingTransform();
+                if ((vTx != null) && !vTx.isIdentity()) {
+                    try {
+                        AffineTransform invVTx = vTx.createInverse();
+                        Tx.concatenate(invVTx);
+                    } catch (NoninvertibleTransformException nite) {
+                        /* nothing */
+                    }
                 }
             }
 
diff --git a/sources/org/apache/batik/apps/svgbrowser/XMLInputHandler.java b/sources/org/apache/batik/apps/svgbrowser/XMLInputHandler.java
index f50f884..f1f1b6c 100644
--- a/sources/org/apache/batik/apps/svgbrowser/XMLInputHandler.java
+++ b/sources/org/apache/batik/apps/svgbrowser/XMLInputHandler.java
@@ -47,6 +47,8 @@
 import org.w3c.dom.svg.SVGDocument;
 
 /**
+ * A <tt>SquiggleInputHandler</tt> that handles XSLT transformable
+ * XML documents.
  * This implementation of the <tt>SquiggleInputHandler</tt> class
  * handles XML files by looking for the first
  * &lt;?xml-stylesheet ... ?&gt; processing instruction referencing
diff --git a/sources/org/apache/batik/bridge/AbstractGraphicsNodeBridge.java b/sources/org/apache/batik/bridge/AbstractGraphicsNodeBridge.java
index b4d2ccb..bc78399 100644
--- a/sources/org/apache/batik/bridge/AbstractGraphicsNodeBridge.java
+++ b/sources/org/apache/batik/bridge/AbstractGraphicsNodeBridge.java
@@ -203,8 +203,14 @@
      * Invoked when an MutationEvent of type 'DOMNodeInserted' is fired.
      */
     public void handleDOMNodeInsertedEvent(MutationEvent evt) {
-        // never called. The global listener on the document will
-        // invoke this method on the parent element.
+        if ( evt.getTarget() instanceof Element ){
+            // Handle "generic" bridges.
+            Element e2 = (Element)evt.getTarget();
+            Bridge b = ctx.getBridge(e2);
+            if (b instanceof GenericBridge) {
+                ((GenericBridge) b).handleElement(ctx, e2);
+            }
+        }
     }
 
     /**
diff --git a/sources/org/apache/batik/bridge/BaseScriptingEnvironment.java b/sources/org/apache/batik/bridge/BaseScriptingEnvironment.java
index 3218017..ef1fd5c 100644
--- a/sources/org/apache/batik/bridge/BaseScriptingEnvironment.java
+++ b/sources/org/apache/batik/bridge/BaseScriptingEnvironment.java
@@ -56,19 +56,23 @@
  */
 public class BaseScriptingEnvironment {
     /**
-     * Constant used to describe inline scripts
+     * Constant used to describe inline scripts.
+     * <pre>
      * {0} - URL of document containing script.
      * {1} - Element tag
      * {2} - line number of element.
+     * </pre>
      */
     public static final String INLINE_SCRIPT_DESCRIPTION
         = "BaseScriptingEnvironment.constant.inline.script.description";
 
     /**
-     * Constant used to describe inline scripts
+     * Constant used to describe inline scripts.
+     * <pre>
      * {0} - URL of document containing script.
      * {1} - Event attribute name
      * {2} - line number of element.
+     * </pre>
      */
     public static final String EVENT_SCRIPT_DESCRIPTION
         = "BaseScriptingEnvironment.constant.event.script.description";
diff --git a/sources/org/apache/batik/bridge/BridgeContext.java b/sources/org/apache/batik/bridge/BridgeContext.java
index 7c0febd..fd05b26 100644
--- a/sources/org/apache/batik/bridge/BridgeContext.java
+++ b/sources/org/apache/batik/bridge/BridgeContext.java
@@ -58,6 +58,7 @@
 import org.apache.batik.util.ParsedURL;
 import org.apache.batik.util.SVGConstants;
 import org.apache.batik.util.Service;
+
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -180,9 +181,10 @@
     protected TextPainter textPainter;
 
     /**
-     * Indicates that no DOM listeners should be registered.
-     * In this case the generated GVT tree should be totally
-     * independent of the DOM tree.
+     * Indicates that no DOM listeners should be registered.  In this
+     * case the generated GVT tree should be totally independent of
+     * the DOM tree (in practice text holds references to the source
+     * text elements for font resolution).
      */
     public final static int STATIC      = 0;
     /**
@@ -232,7 +234,7 @@
     /**
      * Constructs a new bridge context.
      * @param userAgent the user agent
-     * @param documentLoader document loader
+     * @param loader document loader
      */
     public BridgeContext(UserAgent userAgent,
                          DocumentLoader loader) {
@@ -254,6 +256,40 @@
         this.documentLoader = documentLoader;
     }
 
+
+    /** 
+     * This function creates a new 'sub' BridgeContext to associated
+     * with 'newDoc' if one currently doesn't exist, otherwise it
+     * returns the BridgeContext currently associated with the
+     * document.
+     * @param newDoc The document to get/create a BridgeContext for.
+     */
+    public BridgeContext createSubBridgeContext(SVGOMDocument newDoc) {
+        CSSEngine eng = newDoc.getCSSEngine();
+        if (eng != null)
+            return (BridgeContext)newDoc.getCSSEngine().getCSSContext();
+
+        BridgeContext subCtx;
+        subCtx = createBridgeContext();
+        subCtx.setGVTBuilder(getGVTBuilder());
+        subCtx.setTextPainter(getTextPainter());
+        subCtx.setDocument(newDoc);
+        subCtx.initializeDocument(newDoc);
+        if (isInteractive())
+            subCtx.addUIEventListeners(newDoc);
+        return subCtx;
+    }
+
+
+    /** 
+     * This function creates a new BridgeContext, it mostly
+     * exists so subclasses can provide an instance of 
+     * themselves when a sub BridgeContext is needed
+     */
+    public BridgeContext createBridgeContext() {
+        return new BridgeContext(getUserAgent(), getDocumentLoader());
+    }
+
     /**
      * Initializes the given document.
      */
@@ -589,15 +625,7 @@
                 // since the new document isn't 'tied into' this
                 // bridge context.
                 if (refDoc != document) {
-                    CSSEngine eng = refDoc.getCSSEngine();
-                    if (eng == null) {
-                        BridgeContext subCtx;
-                        subCtx = new BridgeContext(getUserAgent(),
-                                                   getDocumentLoader());
-                        subCtx.setGVTBuilder(getGVTBuilder());
-                        subCtx.setDocument(refDoc);
-                        subCtx.initializeDocument(refDoc);
-                    }
+                    createSubBridgeContext(refDoc);
                 }
                 return ref;
             }
@@ -607,6 +635,7 @@
         } catch (InterruptedIOException ex) {
             throw new InterruptedBridgeException();
         } catch (IOException ex) {
+            ex.printStackTrace();
             throw new BridgeException(e, ERR_URI_IO,
                                       new Object[] {uri});
         } catch (IllegalArgumentException ex) {
@@ -786,7 +815,7 @@
     /**
      * Returns the bridge associated with the element type
      *
-     * @param nameSpaceURI namespace of the requested element
+     * @param namespaceURI namespace of the requested element
      * @param localName element's local name
      *
      */
@@ -1432,12 +1461,12 @@
      * on the ExternalResourceSecurity strategy returned by 
      * getExternalResourceSecurity.
      *
-     * @param scriptURL url for the script, as defined in
-     *        the script's xlink:href attribute. If that
+     * @param resourceURL url for the script, as defined in
+     *        the resource's xlink:href attribute. If that
      *        attribute was empty, then this parameter should
      *        be null
      * @param docURL url for the document into which the 
-     *        script was found.
+     *        resource was found.
      */
     public void 
         checkLoadExternalResource(ParsedURL resourceURL,
@@ -1456,7 +1485,7 @@
     
     /**
      * Tells whether the given SVG document is Interactive.
-     * We say it is, if it has any <title>, <desc>, or <a> elements,
+     * We say it is, if it has any &lt;title>, &lt;desc>, or &lt;a> elements,
      * of if the 'cursor' property is anything but Auto on any element.
      */
     public boolean isInteractiveDocument(Document doc) {
@@ -1538,10 +1567,9 @@
     // bridge extensions support //////////////////////////////////////////////
 
     protected List extensions = null;
+
     /**
      * Registers the bridges to handle SVG 1.0 elements.
-     *
-     * @param ctx the bridge context to initialize
      */
     public void registerSVGBridges() {
         UserAgent ua = getUserAgent();
diff --git a/sources/org/apache/batik/bridge/BridgeEventSupport.java b/sources/org/apache/batik/bridge/BridgeEventSupport.java
index 5de9f1d..855aaf9 100644
--- a/sources/org/apache/batik/bridge/BridgeEventSupport.java
+++ b/sources/org/apache/batik/bridge/BridgeEventSupport.java
@@ -101,7 +101,8 @@
         public void handleEvent(Event evt) {
             dispatcher.removeGraphicsNodeMouseListener(listener);
             dispatcher.removeGraphicsNodeKeyListener(listener);
-            evt.getTarget().removeEventListener("SVGUnload", this, false);
+            evt.getTarget().removeEventListener
+                (SVGConstants.SVG_SVGUNLOAD_EVENT_TYPE, this, false);
         }
     }
 
diff --git a/sources/org/apache/batik/bridge/CursorManager.java b/sources/org/apache/batik/bridge/CursorManager.java
index ade3c15..9ae2e4d 100644
--- a/sources/org/apache/batik/bridge/CursorManager.java
+++ b/sources/org/apache/batik/bridge/CursorManager.java
@@ -141,9 +141,9 @@
     protected CursorCache cursorCache = new CursorCache();
 
     /**
-     * Constructor
+     * Creates a new CursorManager object.
      *
-     * @param BridgeContext ctx, the BridgeContext associated to this CursorManager
+     * @param ctx the BridgeContext associated to this CursorManager
      */
     public CursorManager(BridgeContext ctx) {
         this.ctx = ctx;
diff --git a/sources/org/apache/batik/bridge/ErrorConstants.java b/sources/org/apache/batik/bridge/ErrorConstants.java
index 5464321..87cd662 100644
--- a/sources/org/apache/batik/bridge/ErrorConstants.java
+++ b/sources/org/apache/batik/bridge/ErrorConstants.java
@@ -27,29 +27,37 @@
 
     /**
      * The error code when a required attribute is missing.
+     * <pre>
      * {0} = the name of the attribute
+     * </pre>
      */
     public static final String ERR_ATTRIBUTE_MISSING
         = "attribute.missing";
 
     /**
      * The error code when an attribute has a syntax error.
+     * <pre>
      * {0} = the name of the attribute
      * {1} = the wrong value
+     * </pre>
      */
     public static final String ERR_ATTRIBUTE_VALUE_MALFORMED
         = "attribute.malformed";
 
     /**
      * The error code when a length, which must be positive, is negative.
+     * <pre>
      * {0} = the name of the attribute
+     * </pre>
      */
     public static final String ERR_LENGTH_NEGATIVE
         = "length.negative";
 
     /**
      * The error code when a CSS length is negative.
+     * <pre>
      * {0} = property
+     * </pre>
      */
     public static final String ERR_CSS_LENGTH_NEGATIVE
         = "css.length.negative";
@@ -57,14 +65,18 @@
     /**
      * The error code when a URI specified in a CSS property
      * referenced a bad element.
+     * <pre>
      * {0} = the uri
+     * </pre>
      */
     public static final String ERR_CSS_URI_BAD_TARGET
         = "css.uri.badTarget";
 
     /**
      * The error code when a specified URI references a bad element.
+     * <pre>
      * {0} = the uri
+     * </pre>
      */
     public static final String ERR_URI_BAD_TARGET
         = "uri.badTarget";
@@ -72,7 +84,9 @@
     /**
      * The error code when the bridge detected circular dependencies
      * while resolving a list of URI.
+     * <pre>
      * {0} = the uri
+     * </pre>
      */
     public static final String ERR_XLINK_HREF_CIRCULAR_DEPENDENCIES
         = "xlink.href.circularDependencies";
@@ -87,7 +101,9 @@
     /**
      * The error code when the bridge encoutered an I/O error while
      * loading a URI.
+     * <pre>
      * {0} = the uri
+     * </pre>
      */
     public static final String ERR_URI_IO
         = "uri.io";
@@ -103,7 +119,9 @@
     /**
      * The error code when the bridge tries to referenced an invalid
      * node inside a document.
+     * <pre>
      * {0} = the uri
+     * </pre>
      */
     public static final String ERR_URI_REFERENCE_A_DOCUMENT
         = "uri.referenceDocument";
@@ -111,7 +129,9 @@
     /**
      * The error code when the bridge tries to an image and the image
      * format is not supported.
+     * <pre>
      * {0} = the uri
+     * </pre>
      */
     public static final String ERR_URI_IMAGE_INVALID
         = "uri.image.invalid";
diff --git a/sources/org/apache/batik/bridge/GVTBuilder.java b/sources/org/apache/batik/bridge/GVTBuilder.java
index 48e4900..384bfe9 100644
--- a/sources/org/apache/batik/bridge/GVTBuilder.java
+++ b/sources/org/apache/batik/bridge/GVTBuilder.java
@@ -148,8 +148,8 @@
      *
      * @param ctx the bridge context
      * @param e the element to build
-     * @param parent the composite graphics node, parent of the
-     *               graphics node to build
+     * @param parentNode the composite graphics node, parent of the
+     *                   graphics node to build
      * @exception BridgeException if an error occured while constructing
      * the GVT tree
      */
@@ -168,8 +168,8 @@
      *
      * @param ctx the bridge context
      * @param e the element to build
-     * @param parent the composite graphics node, parent of the
-     *               graphics node to build
+     * @param parentNode the composite graphics node, parent of the
+     *                   graphics node to build
      * @exception BridgeException if an error occured while constructing
      * the GVT tree
      */
diff --git a/sources/org/apache/batik/bridge/GraphicsNodeBridge.java b/sources/org/apache/batik/bridge/GraphicsNodeBridge.java
index 23b4457..a68e212 100644
--- a/sources/org/apache/batik/bridge/GraphicsNodeBridge.java
+++ b/sources/org/apache/batik/bridge/GraphicsNodeBridge.java
@@ -66,12 +66,12 @@
     boolean getDisplay(Element e);
 
     /**
-     * <!> FIX ME: Move to Bridge 
-     * 
      * Returns the Bridge instance to be used for a single DOM 
      * element. For example, a static Bridge (i.e., a Bridge for
      * static SVG content) will always return the same instance.
      * A dynamic Bridge will return a new instance on each call.
+     *
+     * <!> FIX ME: Move to Bridge 
      */
     Bridge getInstance();
 
diff --git a/sources/org/apache/batik/bridge/NoLoadScriptSecurity.java b/sources/org/apache/batik/bridge/NoLoadScriptSecurity.java
index 73f059c..68e1bf9 100644
--- a/sources/org/apache/batik/bridge/NoLoadScriptSecurity.java
+++ b/sources/org/apache/batik/bridge/NoLoadScriptSecurity.java
@@ -17,7 +17,6 @@
  */
 package org.apache.batik.bridge;
 
-
 /**
  * This implementation for the <tt>ScriptSecurity</tt> interface
  * does not allow scripts to be loaded.
@@ -26,6 +25,7 @@
  * @version $Id$
  */
 public class NoLoadScriptSecurity implements ScriptSecurity {
+
     /**
      * Message when trying to load a script file and the Document
      * does not have a URL
@@ -49,14 +49,9 @@
     }
 
     /**
+     * Creates a new NoLoadScriptSecurity object.
      * @param scriptType type of script, as found in the 
      *        type attribute of the &lt;script&gt; element.
-     * @param scriptURL url for the script, as defined in
-     *        the script's xlink:href attribute. If that
-     *        attribute was empty, then this parameter should
-     *        be null
-     * @param docURL url for the document into which the 
-     *        script was found.
      */
     public NoLoadScriptSecurity(String scriptType){
 
@@ -65,6 +60,3 @@
                                     new Object[]{scriptType}));
     }
 }
-
-
-    
diff --git a/sources/org/apache/batik/bridge/PaintServer.java b/sources/org/apache/batik/bridge/PaintServer.java
index 3e72d30..78ee74e 100644
--- a/sources/org/apache/batik/bridge/PaintServer.java
+++ b/sources/org/apache/batik/bridge/PaintServer.java
@@ -237,7 +237,6 @@
      * instance according to the specified parameters.
      *
      * @param paintedElement the element interested in a Paint
-     * @param decl the CSS declaration of the painted element
      * @param paintedNode the graphics node to paint (objectBoundingBox)
      * @param paintDef the paint definition
      * @param opacity the opacity to consider for the Paint
@@ -274,32 +273,32 @@
                                           (ICCColor)paintDef.item(1),
                                           opacity, ctx);
 
-            case CSSPrimitiveValue.CSS_URI:
+            case CSSPrimitiveValue.CSS_URI: {
                 Paint result = silentConvertURIPaint(paintedElement,
                                                      paintedNode,
-                                                     v,
-                                                     opacity,
-                                                     ctx);
-                if (result == null) {
-                    v = paintDef.item(1);
-                    switch (v.getPrimitiveType()) {
-                    case CSSPrimitiveValue.CSS_IDENT:
-                        return null; // none
+                                                     v, opacity, ctx);
+                if (result != null) return result;
 
-                    case CSSPrimitiveValue.CSS_RGBCOLOR:
-                        if (paintDef.getLength() == 2) {
-                            return convertColor(v, opacity);
-                        } else {
-                            return convertRGBICCColor(paintedElement, v,
-                                                      (ICCColor)paintDef.item(2),
-                                                      opacity, ctx);
-                        }
-                    default:
-                        throw new Error(); // can't be reached
+                v = paintDef.item(1);
+                switch (v.getPrimitiveType()) {
+                case CSSPrimitiveValue.CSS_IDENT:
+                    return null; // none
+                    
+                case CSSPrimitiveValue.CSS_RGBCOLOR:
+                    if (paintDef.getLength() == 2) {
+                        return convertColor(v, opacity);
+                    } else {
+                        return convertRGBICCColor(paintedElement, v,
+                                                  (ICCColor)paintDef.item(2),
+                                                  opacity, ctx);
                     }
+                default:
+                    throw new Error(); // can't be reached
                 }
+            }
             default:
-                throw new Error(); // can't be reached
+                // can't be reached
+                throw new Error("Unallowed Value: " + v.getPrimitiveType()); 
             }
         }
     }
@@ -391,7 +390,7 @@
      * ICC color value or null if the related color profile could not
      * be used or loaded for any reason.
      *
-     * @param paintedElement the element using the color
+     * @param e the element using the color
      * @param c the ICC color definition
      * @param opacity the opacity
      * @param ctx the bridge context to use
@@ -437,7 +436,7 @@
     /**
      * Converts the given Value and opacity to a Color object.
      * @param c The CSS color to convert.
-     * @param o The opacity value (0 <= o <= 1).
+     * @param opacity The opacity value (0 &lt;= o &lt;= 1).
      */
     public static Color convertColor(Value c, float opacity) {
         int r = resolveColorComponent(c.getRed());
@@ -519,7 +518,6 @@
      * number in user units.
      *
      * @param v the CSS value describing the dasharray property
-     * @param uctx the unit processor context used to resolve units
      */
     public static float [] convertStrokeDasharray(Value v) {
         float [] dasharray = null;
diff --git a/sources/org/apache/batik/bridge/RepaintManager.java b/sources/org/apache/batik/bridge/RepaintManager.java
index a628f91..0d6f26c 100644
--- a/sources/org/apache/batik/bridge/RepaintManager.java
+++ b/sources/org/apache/batik/bridge/RepaintManager.java
@@ -55,7 +55,7 @@
     
     /**
      * Updates the rendering buffer.
-     * @param aoi The area of interest in the renderer space units.
+     * @param areas The areas of interest in renderer space units.
      * @return the list of the rectangles to repaint.
      */
     public Collection updateRendering(Collection areas) 
@@ -98,7 +98,8 @@
      * @param u2d The user to device transform.
      * @param dbr Whether the double buffering should be used.
      * @param aoi The area of interest in the renderer space units.
-     * @param width&nbsp;height The offscreen buffer size.
+     * @param width The offscreen buffer width.
+     * @param height The offscreen buffer width.
      */
     public void setupRenderer(AffineTransform u2d,
                               boolean dbr,
diff --git a/sources/org/apache/batik/bridge/SVGAltGlyphElementBridge.java b/sources/org/apache/batik/bridge/SVGAltGlyphElementBridge.java
index 1e1d0b4..fb5264c 100644
--- a/sources/org/apache/batik/bridge/SVGAltGlyphElementBridge.java
+++ b/sources/org/apache/batik/bridge/SVGAltGlyphElementBridge.java
@@ -93,9 +93,11 @@
             // couldn't find the referenced element
             return null;
         }
+        if (!SVG_NAMESPACE_URI.equals(refElement.getNamespaceURI()))
+            return null; // Not an SVG element.
 
         // if the referenced element is a glyph
-        if (refElement.getTagName().equals(SVG_GLYPH_TAG)) {
+        if (refElement.getLocalName().equals(SVG_GLYPH_TAG)) {
 
             Glyph glyph = getGlyph(ctx, uri, altGlyphElement, fontSize, aci);
 
@@ -110,7 +112,7 @@
         }
 
         // else should be an altGlyphDef element
-        if (refElement.getTagName().equals(SVG_ALT_GLYPH_DEF_TAG)) {
+        if (refElement.getLocalName().equals(SVG_ALT_GLYPH_DEF_TAG)) {
 
             // if not local import the referenced altGlyphDef
             // into the current document
@@ -143,7 +145,9 @@
             for (int i = 0; i < numAltGlyphDefChildren; i++) {
                 Node altGlyphChild = altGlyphDefChildren.item(i);
                 if (altGlyphChild.getNodeType() == Node.ELEMENT_NODE) {
-                    if (((Element)altGlyphChild).getTagName().equals(SVG_GLYPH_REF_TAG)) {
+                    Element agc = (Element)altGlyphChild;
+                    if (SVG_NAMESPACE_URI.equals(agc.getNamespaceURI()) &&
+                        SVG_GLYPH_REF_TAG.equals(agc.getLocalName())) {
                         containsGlyphRefNodes = true;
                         break;
                     }
@@ -270,12 +274,12 @@
             }
         }
 
-        if (refGlyphElement == null
-            || !refGlyphElement.getTagName().equals(SVG_GLYPH_TAG)) {
+        if ((refGlyphElement == null) ||
+            (!SVG_NAMESPACE_URI.equals(refGlyphElement.getNamespaceURI())) ||
+            (!SVG_GLYPH_TAG.equals(refGlyphElement.getLocalName())))
             // couldn't find the referenced glyph element,
             // or referenced element not a glyph
             return null;
-        }
 
         // see if the referenced glyph element is local
         SVGOMDocument document
diff --git a/sources/org/apache/batik/bridge/SVGAltGlyphHandler.java b/sources/org/apache/batik/bridge/SVGAltGlyphHandler.java
index 271379a..229f21b 100644
--- a/sources/org/apache/batik/bridge/SVGAltGlyphHandler.java
+++ b/sources/org/apache/batik/bridge/SVGAltGlyphHandler.java
@@ -64,7 +64,8 @@
         (FontRenderContext frc, float fontSize,
          AttributedCharacterIterator aci) {
         try {
-            if (textElement.getTagName().equals(SVG_ALT_GLYPH_TAG)) {
+            if (SVG_NAMESPACE_URI.equals(textElement.getNamespaceURI()) &&
+                SVG_ALT_GLYPH_TAG.equals(textElement.getLocalName())) {
                 SVGAltGlyphElementBridge altGlyphBridge
                     = (SVGAltGlyphElementBridge)ctx.getBridge(textElement);
                 Glyph[] glyphArray = altGlyphBridge.createAltGlyphArray
diff --git a/sources/org/apache/batik/bridge/SVGBridgeExtension.java b/sources/org/apache/batik/bridge/SVGBridgeExtension.java
index 3fdac1b..7fb229e 100644
--- a/sources/org/apache/batik/bridge/SVGBridgeExtension.java
+++ b/sources/org/apache/batik/bridge/SVGBridgeExtension.java
@@ -1,6 +1,6 @@
 /*
 
-   Copyright 2001-2002,2004  The Apache Software Foundation 
+   Copyright 2001-2002,2004-2005  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 @@
      * This should contain a contact address (usually an e-mail address).
      */
     public String getContactAddress() {
-        return "batik-dev@xml.apache.org";
+        return "batik-dev@xmlgraphics.apache.org";
     }
 
     /**
diff --git a/sources/org/apache/batik/bridge/SVGDescElementBridge.java b/sources/org/apache/batik/bridge/SVGDescElementBridge.java
index 8def006..1afc277 100644
--- a/sources/org/apache/batik/bridge/SVGDescElementBridge.java
+++ b/sources/org/apache/batik/bridge/SVGDescElementBridge.java
@@ -1,6 +1,6 @@
 /*
 
-   Copyright 2001  The Apache Software Foundation 
+   Copyright 2001,2005  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.
@@ -25,7 +25,7 @@
  * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
  * @version $Id$
  */
-public class SVGDescElementBridge extends AbstractSVGBridge implements GenericBridge {
+public class SVGDescElementBridge extends SVGDescriptiveElementBridge {
 
     /**
      * Constructs a new bridge for the &lt;desc&gt; element.
@@ -39,17 +39,10 @@
         return SVG_DESC_TAG;
     }
 
-    /**
-     * Invoked to handle an <tt>Element</tt> for a given <tt>BridgeContext</tt>.
-     * For example, see the <tt>SVGDescElementBridge</tt>.
-     *
-     * @param ctx the bridge context to use
-     * @param e the element that describes the graphics node to build
-     */
-    public void handleElement(BridgeContext ctx, Element e){
-        UserAgent ua = ctx.getUserAgent();
-        ua.handleElement(e, null);
-    }
 
+    /**
+     * Returns a new instance of this bridge.
+     */
+    public Bridge getInstance() { return new SVGDescElementBridge(); }
 }
 
diff --git a/sources/org/apache/batik/bridge/SVGDescriptiveElementBridge.java b/sources/org/apache/batik/bridge/SVGDescriptiveElementBridge.java
new file mode 100644
index 0000000..25ed28b
--- /dev/null
+++ b/sources/org/apache/batik/bridge/SVGDescriptiveElementBridge.java
@@ -0,0 +1,131 @@
+/*
+
+   Copyright 2005 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.
+   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.batik.bridge;
+
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.events.MutationEvent;
+
+import org.apache.batik.css.engine.CSSEngineEvent;
+import org.apache.batik.dom.svg.SVGContext;
+import org.apache.batik.dom.svg.SVGOMElement;
+
+/**
+ * Base class for 'descriptive' elements, mostly title and desc.
+ *
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
+ * @version $Id$
+ */
+public abstract class SVGDescriptiveElementBridge extends AbstractSVGBridge 
+    implements GenericBridge,  BridgeUpdateHandler, SVGContext {
+
+    Element theElt;
+    Element parent;
+    BridgeContext theCtx;
+
+    public SVGDescriptiveElementBridge() {
+    }
+
+
+    /**
+     * Invoked to handle an <tt>Element</tt> for a given
+     * <tt>BridgeContext</tt>.  For example, see the
+     * <tt>SVGDescElementBridge</tt>.
+     *
+     * @param ctx the bridge context to use
+     * @param e the element that describes the graphics node to build
+     */
+    public void handleElement(BridgeContext ctx, Element e){
+        UserAgent ua = ctx.getUserAgent();
+        ua.handleElement(e, Boolean.TRUE);
+        
+        if (ctx.isDynamic()) {
+            SVGDescriptiveElementBridge b;
+            b = (SVGDescriptiveElementBridge)getInstance();
+            b.theElt = e;
+            b.parent = (Element)e.getParentNode();
+            b.theCtx = ctx;
+            ((SVGOMElement)e).setSVGContext(b);
+        }
+
+    }
+
+    // BridgeUpdateHandler implementation ////////////////////////////////////
+
+    public void dispose() {
+        UserAgent ua = theCtx.getUserAgent();
+        ((SVGOMElement)theElt).setSVGContext(null);
+        ua.handleElement(theElt, parent);
+        theElt = null;
+        parent = null;
+    }
+    public void handleDOMNodeInsertedEvent(MutationEvent evt) { 
+        UserAgent ua = theCtx.getUserAgent();
+        ua.handleElement(theElt, Boolean.TRUE);
+    }
+    public void handleDOMCharacterDataModified(MutationEvent evt) { 
+        UserAgent ua = theCtx.getUserAgent();
+        ua.handleElement(theElt, Boolean.TRUE);
+    }
+
+    public void handleDOMNodeRemovedEvent (MutationEvent evt) { 
+        dispose();
+    }
+
+    public void handleDOMAttrModifiedEvent(MutationEvent evt) { }
+    public void handleCSSEngineEvent(CSSEngineEvent evt) { }
+
+    // SVGContext implementation ///////////////////////////////////////////
+
+    /**
+     * Returns the size of a px CSS unit in millimeters.
+     */
+    public float getPixelUnitToMillimeter() {
+        return theCtx.getUserAgent().getPixelUnitToMillimeter();
+    }
+
+    /**
+     * Returns the size of a px CSS unit in millimeters.
+     * This will be removed after next release.
+     * @see #getPixelUnitToMillimeter()
+     */
+    public float getPixelToMM() {
+        return getPixelUnitToMillimeter();
+            
+    }
+
+    public Rectangle2D getBBox() { return null; }
+    public AffineTransform getScreenTransform() { 
+        return theCtx.getUserAgent().getTransform();
+    }
+    public void setScreenTransform(AffineTransform at) { 
+        theCtx.getUserAgent().setTransform(at);
+    }
+    public AffineTransform getCTM() { return null; }
+    public AffineTransform getGlobalTransform() { return null; }
+    public float getViewportWidth() {
+        return theCtx.getBlockWidth(theElt);
+    }
+    public float getViewportHeight() {
+        return theCtx.getBlockHeight(theElt);
+    }
+    public float getFontSize() { return 0; }
+};
diff --git a/sources/org/apache/batik/bridge/SVGFeImageElementBridge.java b/sources/org/apache/batik/bridge/SVGFeImageElementBridge.java
index 92b8ab1..5ee5034 100644
--- a/sources/org/apache/batik/bridge/SVGFeImageElementBridge.java
+++ b/sources/org/apache/batik/bridge/SVGFeImageElementBridge.java
@@ -197,7 +197,7 @@
      *
      * @param ctx the bridge context
      * @param primitiveRegion the primitive region
-     * @param Element the referenced element
+     * @param refElement the referenced element
      * @param toBBoxNeeded true if there is a need to transform to ObjectBoundingBox
      *        space
      * @param filterElement parent filter element
@@ -260,7 +260,7 @@
      *
      * @param ctx the bridge context
      * @param primitiveRegion the primitive region
-     * @param url the url of the image
+     * @param purl the url of the image
      */
     protected static Filter createRasterFeImage(BridgeContext ctx,
                                                 Rectangle2D   primitiveRegion,
diff --git a/sources/org/apache/batik/bridge/SVGGVTFont.java b/sources/org/apache/batik/bridge/SVGGVTFont.java
index 054fe23..01bd487 100644
--- a/sources/org/apache/batik/bridge/SVGGVTFont.java
+++ b/sources/org/apache/batik/bridge/SVGGVTFont.java
@@ -307,7 +307,7 @@
      * Returns true if the glyph form matches that of the current character in
      * the aci.
      *
-     * @param gyphUnicode The unicode value of the glyph.
+     * @param glyphUnicode The unicode value of the glyph.
      * @param glyphForm The arabic-form glyph attribute.
      * @param aci The aci containing the character to check.
      * @param currentIndex The index of the character to check.
@@ -410,7 +410,7 @@
      *
      * @param name The name of the glyph to check.
      *
-     * @return True if the glyph can be displayed.
+     * @return true if the glyph can be displayed.
      */
     public boolean canDisplayGivenName(String name) {
         for (int i = 0; i < glyphNames.length; i++) {
@@ -430,7 +430,7 @@
      *
      * @param c The character to check.
      *
-     * @param True if the character can be displayed.
+     * @return true if the character can be displayed.
      */
     public boolean canDisplay(char c) {
         for (int i = 0; i < glyphUnicodes.length; i++) {
@@ -709,7 +709,7 @@
      *
      * @param size The size of the new font.
      *
-     * @param return The new font object.
+     * @return The new font object.
      */
     public GVTFont deriveFont(float size) {
         return new SVGGVTFont(size, fontFace, glyphUnicodes, glyphNames,
diff --git a/sources/org/apache/batik/bridge/SVGImageElementBridge.java b/sources/org/apache/batik/bridge/SVGImageElementBridge.java
index 42dacb7..d023fb7 100644
--- a/sources/org/apache/batik/bridge/SVGImageElementBridge.java
+++ b/sources/org/apache/batik/bridge/SVGImageElementBridge.java
@@ -535,7 +535,7 @@
      *
      * @param ctx the bridge context
      * @param e the image element
-     * @param uriStr the uri of the image
+     * @param img the image to use in creating the graphics node
      */
     protected GraphicsNode createRasterImageNode(BridgeContext ctx,
                                                  Element       e,
@@ -584,15 +584,7 @@
                                               Element e,
                                               SVGDocument imgDocument) {
         CSSEngine eng = ((SVGOMDocument)imgDocument).getCSSEngine();
-        if (eng != null) {
-            subCtx = (BridgeContext)eng.getCSSContext();
-        } else {
-            subCtx = new BridgeContext(ctx.getUserAgent(), 
-                                       ctx.getDocumentLoader());
-            subCtx.setGVTBuilder(ctx.getGVTBuilder());
-            subCtx.setDocument(imgDocument);
-            subCtx.initializeDocument(imgDocument);
-        }
+        subCtx = ctx.createSubBridgeContext((SVGOMDocument)imgDocument);
 
         CompositeGraphicsNode result = new CompositeGraphicsNode();
         // handles the 'preserveAspectRatio', 'overflow' and 'clip' and 
@@ -616,8 +608,10 @@
         node = (CanvasGraphicsNode)subCtx.getGVTBuilder().build
             (subCtx, svgElement);
 
-        if (eng == null) // If we "created" this document then add listerns.
+        if ((eng == null) && ctx.isInteractive()) {
+            // If we "created" this document then add listerns.
             subCtx.addUIEventListeners(imgDocument);
+        }
 
         // HACK: remove the clip set by the SVGSVGElement as the overflow
         // and clip properties must be ignored. The clip will be set later
diff --git a/sources/org/apache/batik/bridge/SVGKernElementBridge.java b/sources/org/apache/batik/bridge/SVGKernElementBridge.java
index 629a5c6..ee10918 100644
--- a/sources/org/apache/batik/bridge/SVGKernElementBridge.java
+++ b/sources/org/apache/batik/bridge/SVGKernElementBridge.java
@@ -75,19 +75,23 @@
                 firstUnicodeRanges.add(new UnicodeRange(token));
             } else {
                 int[] glyphCodes = font.getGlyphCodesForUnicode(token);
-                if (firstGlyphSet == null)
+                if (firstGlyphSet == null) {
                     firstGlyphSet = glyphCodes;
-                else if ((firstGlyphLen + glyphCodes.length) > 
-                         firstGlyphSet.length) {
-                    int sz = firstGlyphSet.length*2;
-                    if (sz <firstGlyphLen + glyphCodes.length)
-                        sz = firstGlyphLen + glyphCodes.length;
-                    int [] tmp = new int[sz];
+                    firstGlyphLen = glyphCodes.length;
+                }else {
+                    if ((firstGlyphLen + glyphCodes.length) > 
+                        firstGlyphSet.length) {
+                        int sz = firstGlyphSet.length*2;
+                        if (sz <firstGlyphLen + glyphCodes.length)
+                            sz = firstGlyphLen + glyphCodes.length;
+                        int [] tmp = new int[sz];
+                        for (int i = 0; i < firstGlyphLen; i++)
+                            tmp[i] = firstGlyphSet[i];
+                        firstGlyphSet = tmp;
+                    }
                     for (int i = 0; i < glyphCodes.length; i++)
-                        tmp[i] = firstGlyphSet[i];
+                        firstGlyphSet[firstGlyphLen++] = glyphCodes[i];
                 }
-                for (int i = 0; i < glyphCodes.length; i++)
-                    firstGlyphSet[firstGlyphLen++] = glyphCodes[i];
             }
         }
         
@@ -99,19 +103,23 @@
                 secondUnicodeRanges.add(new UnicodeRange(token));
             } else {
                 int[] glyphCodes = font.getGlyphCodesForUnicode(token);
-                if (secondGlyphSet == null)
+                if (secondGlyphSet == null) {
                     secondGlyphSet = glyphCodes;
-                else if ((secondGlyphLen + glyphCodes.length) > 
-                         secondGlyphSet.length) {
-                    int sz = secondGlyphSet.length*2;
-                    if (sz <secondGlyphLen + glyphCodes.length)
-                        sz = secondGlyphLen + glyphCodes.length;
-                    int [] tmp = new int[sz];
+                    secondGlyphLen = glyphCodes.length;
+                } else {
+                    if ((secondGlyphLen + glyphCodes.length) > 
+                        secondGlyphSet.length) {
+                        int sz = secondGlyphSet.length*2;
+                        if (sz <secondGlyphLen + glyphCodes.length)
+                            sz = secondGlyphLen + glyphCodes.length;
+                        int [] tmp = new int[sz];
+                        for (int i = 0; i < secondGlyphLen; i++)
+                            tmp[i] = secondGlyphSet[i];
+                        secondGlyphSet = tmp;
+                    }
                     for (int i = 0; i < glyphCodes.length; i++)
-                        tmp[i] = secondGlyphSet[i];
+                        secondGlyphSet[secondGlyphLen++] = glyphCodes[i];
                 }
-                for (int i = 0; i < glyphCodes.length; i++)
-                    secondGlyphSet[secondGlyphLen++] = glyphCodes[i];
             }
         }
         
@@ -120,19 +128,23 @@
         while (st.hasMoreTokens()) {
             String token = st.nextToken();
             int[] glyphCodes = font.getGlyphCodesForName(token);
-            if (firstGlyphSet == null)
+            if (firstGlyphSet == null) {
                 firstGlyphSet = glyphCodes;
-            else if ((firstGlyphLen + glyphCodes.length) > 
-                     firstGlyphSet.length) {
-                int sz = firstGlyphSet.length*2;
-                if (sz <firstGlyphLen + glyphCodes.length)
-                    sz = firstGlyphLen + glyphCodes.length;
-                int [] tmp = new int[sz];
+                firstGlyphLen = glyphCodes.length;
+            }else {
+                if ((firstGlyphLen + glyphCodes.length) > 
+                    firstGlyphSet.length) {
+                    int sz = firstGlyphSet.length*2;
+                    if (sz <firstGlyphLen + glyphCodes.length)
+                        sz = firstGlyphLen + glyphCodes.length;
+                    int [] tmp = new int[sz];
+                    for (int i = 0; i < firstGlyphLen; i++)
+                        tmp[i] = firstGlyphSet[i];
+                    firstGlyphSet = tmp;
+                }
                 for (int i = 0; i < glyphCodes.length; i++)
-                    tmp[i] = firstGlyphSet[i];
+                    firstGlyphSet[firstGlyphLen++] = glyphCodes[i];
             }
-            for (int i = 0; i < glyphCodes.length; i++)
-                firstGlyphSet[firstGlyphLen++] = glyphCodes[i];
         }
         
         // process the g2 attribute
@@ -140,19 +152,23 @@
         while (st.hasMoreTokens()) {
             String token = st.nextToken();
             int[] glyphCodes = font.getGlyphCodesForName(token);
-            if (secondGlyphSet == null)
+            if (secondGlyphSet == null) {
                 secondGlyphSet = glyphCodes;
-            else if ((secondGlyphLen + glyphCodes.length) > 
-                     secondGlyphSet.length) {
-                int sz = secondGlyphSet.length*2;
-                if (sz <secondGlyphLen + glyphCodes.length)
-                    sz = secondGlyphLen + glyphCodes.length;
-                int [] tmp = new int[sz];
+                secondGlyphLen = glyphCodes.length;
+            } else {
+                if ((secondGlyphLen + glyphCodes.length) > 
+                    secondGlyphSet.length) {
+                    int sz = secondGlyphSet.length*2;
+                    if (sz <secondGlyphLen + glyphCodes.length)
+                        sz = secondGlyphLen + glyphCodes.length;
+                    int [] tmp = new int[sz];
+                    for (int i = 0; i < secondGlyphLen; i++)
+                        tmp[i] = secondGlyphSet[i];
+                    secondGlyphSet = tmp;
+                }
                 for (int i = 0; i < glyphCodes.length; i++)
-                    tmp[i] = secondGlyphSet[i];
+                    secondGlyphSet[secondGlyphLen++] = glyphCodes[i];
             }
-            for (int i = 0; i < glyphCodes.length; i++)
-                secondGlyphSet[secondGlyphLen++] = glyphCodes[i];
         }
 
         // construct the arrays
diff --git a/sources/org/apache/batik/bridge/SVGPathElementBridge.java b/sources/org/apache/batik/bridge/SVGPathElementBridge.java
index cb35be0..641a349 100644
--- a/sources/org/apache/batik/bridge/SVGPathElementBridge.java
+++ b/sources/org/apache/batik/bridge/SVGPathElementBridge.java
@@ -19,13 +19,17 @@
 
 import java.awt.Shape;
 import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
 
 import org.apache.batik.css.engine.CSSEngineEvent;
 import org.apache.batik.css.engine.SVGCSSEngine;
+import org.apache.batik.dom.svg.SVGPathContext;
+import org.apache.batik.ext.awt.geom.PathLength;
 import org.apache.batik.gvt.ShapeNode;
 import org.apache.batik.parser.AWTPathProducer;
 import org.apache.batik.parser.ParseException;
 import org.apache.batik.parser.PathParser;
+
 import org.w3c.dom.Element;
 import org.w3c.dom.events.MutationEvent;
 
@@ -35,7 +39,8 @@
  * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
  * @version $Id$
  */
-public class SVGPathElementBridge extends SVGDecoratedShapeElementBridge {
+public class SVGPathElementBridge extends SVGDecoratedShapeElementBridge 
+       implements SVGPathContext {
 
     /**
      * default shape for the update of 'd' when
@@ -124,4 +129,27 @@
             super.handleCSSPropertyChanged(property);
         }
     }
+
+    Shape      pathLengthShape = null;
+    PathLength pathLength      = null;
+
+    PathLength getPathLengthObj() {
+        Shape s = ((ShapeNode)node).getShape();
+        if (pathLengthShape != s) {
+            pathLength = new PathLength(s);
+            pathLengthShape = s;
+        }
+        return pathLength;
+    }
+
+    // SVGPathContext interface
+    public float getTotalLength() {
+        PathLength pl = getPathLengthObj();
+        return pl.lengthOfPath();
+    }
+
+    public Point2D getPointAtLength(float distance) {
+        PathLength pl = getPathLengthObj();
+        return pl.pointAtLength(distance);
+    }
 }
diff --git a/sources/org/apache/batik/bridge/SVGSVGElementBridge.java b/sources/org/apache/batik/bridge/SVGSVGElementBridge.java
index c8a0e2f..10ca459 100644
--- a/sources/org/apache/batik/bridge/SVGSVGElementBridge.java
+++ b/sources/org/apache/batik/bridge/SVGSVGElementBridge.java
@@ -407,7 +407,6 @@
 
         /**
          * Constructs a new viewport with the specified <tt>SVGSVGElement</tt>.
-         * @param e the SVGSVGElement that defines this viewport
          * @param w the width of the viewport
          * @param h the height of the viewport
          */
diff --git a/sources/org/apache/batik/bridge/SVGTextElementBridge.java b/sources/org/apache/batik/bridge/SVGTextElementBridge.java
index 9ea46f3..193340e 100644
--- a/sources/org/apache/batik/bridge/SVGTextElementBridge.java
+++ b/sources/org/apache/batik/bridge/SVGTextElementBridge.java
@@ -18,6 +18,7 @@
 package org.apache.batik.bridge;
 
 import java.awt.AlphaComposite;
+import java.awt.Color;
 import java.awt.Composite;
 import java.awt.Paint;
 import java.awt.RenderingHints;
@@ -77,8 +78,8 @@
 /**
  * Bridge class for the &lt;text> element.
  *
- * @author <a href="stephane@hillion.org">Stephane Hillion</a>
- * @author <a href="bill.haneman@ireland.sun.com">Bill Haneman</a>
+ * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
  * @version $Id$
  */
 public class SVGTextElementBridge extends AbstractGraphicsNodeBridge 
@@ -87,12 +88,16 @@
     protected final static Integer ZERO = new Integer(0);
 
     public static final 
-        AttributedCharacterIterator.Attribute TEXT_COMPOUND_DELIMITER 
-        = GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER;
+        AttributedCharacterIterator.Attribute TEXT_COMPOUND_DELIMITER =
+        GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER;
 
-    public static final AttributedCharacterIterator.Attribute PAINT_INFO 
-        = GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO;
+    public static final AttributedCharacterIterator.Attribute PAINT_INFO =
+         GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO;
 
+    public static final 
+        AttributedCharacterIterator.Attribute ALT_GLYPH_HANDLER =
+        GVTAttributedCharacterIterator.TextAttribute.ALT_GLYPH_HANDLER;
+        
 
     protected AttributedString laidoutText;
 
@@ -517,9 +522,10 @@
         // Install the attributes.
         addPaintAttributes(as, e, tn, pi, ctx);
 
-        if (usingComplexSVGFont) 
+        if (usingComplexSVGFont) {
             // Force Complex SVG fonts to be recreated, if we have them.
             tn.setAttributedCharacterIterator(as.getIterator());
+        }
     }
 
     /**
@@ -545,6 +551,10 @@
 
         int lastChar = getElementEndIndex(aci, element);
         TextPaintInfo pi = new TextPaintInfo();
+        // Set some basic props so we can get bounds info for complex paints.
+        pi.visible   = true;        
+        pi.fillPaint = Color.black;
+
         as.addAttribute(PAINT_INFO, pi, firstChar, lastChar+1);
         elemTPI.put(element, pi);
 
@@ -1357,11 +1367,11 @@
         Map result = new HashMap();
         String s;
         float f;
-
-        if (element.getTagName().equals(SVG_ALT_GLYPH_TAG)) {
-            result.put
-              (GVTAttributedCharacterIterator.TextAttribute.ALT_GLYPH_HANDLER,
-               new SVGAltGlyphHandler(ctx, element));
+        
+        if (SVG_NAMESPACE_URI.equals(element.getNamespaceURI()) &&
+            element.getLocalName().equals(SVG_ALT_GLYPH_TAG)) {
+            result.put(ALT_GLYPH_HANDLER, 
+                       new SVGAltGlyphHandler(ctx, element));
         }
 
         if (textPath != null) {
@@ -2625,11 +2635,11 @@
      * look for is the charnum th character in the 
      * element
      *
-     * @param list : list of the layouts
-     * @param firstChar : index in the ACI of the first
+     * @param list list of the layouts
+     * @param startIndex index in the ACI of the first
      *   character for the element
-     * @param charnum : index of the character ( among the 
-     *   characters of the element ) looked for.
+     * @param charnum index of the character (among the 
+     *   characters of the element) looked for.
      *
      * @return information about the glyph representing the
      *  character
@@ -2651,8 +2661,7 @@
                 aci.setIndex(info.characterIndex);
 
                 //check is it is a altGlyph
-                if (aci.getAttribute(GVTAttributedCharacterIterator.
-                                     TextAttribute.ALT_GLYPH_HANDLER) != null){
+                if (aci.getAttribute(ALT_GLYPH_HANDLER) != null){
                     info.glyphIndexStart = 0;
                     info.glyphIndexEnd = info.layout.getGlyphCount()-1;
                 } else {
@@ -2921,7 +2930,4 @@
             return false;
         }
     }
-
-
-    
 }
diff --git a/sources/org/apache/batik/bridge/SVGTextPathElementBridge.java b/sources/org/apache/batik/bridge/SVGTextPathElementBridge.java
index a1e08d9..6c52dc1 100644
--- a/sources/org/apache/batik/bridge/SVGTextPathElementBridge.java
+++ b/sources/org/apache/batik/bridge/SVGTextPathElementBridge.java
@@ -64,7 +64,9 @@
         String uri = XLinkSupport.getXLinkHref(textPathElement);
         Element pathElement = ctx.getReferencedElement(textPathElement, uri);
 
-        if (pathElement == null || !pathElement.getTagName().equals(SVG_PATH_TAG)) {
+        if ((pathElement == null) || 
+            (!SVG_NAMESPACE_URI.equals(pathElement.getNamespaceURI())) ||
+            (!pathElement.getLocalName().equals(SVG_PATH_TAG))) {
             // couldn't find the referenced element
             // or the referenced element was not a path
             throw new BridgeException(textPathElement, ERR_URI_BAD_TARGET,
diff --git a/sources/org/apache/batik/bridge/SVGTitleElementBridge.java b/sources/org/apache/batik/bridge/SVGTitleElementBridge.java
index f05be09..63b6e23 100644
--- a/sources/org/apache/batik/bridge/SVGTitleElementBridge.java
+++ b/sources/org/apache/batik/bridge/SVGTitleElementBridge.java
@@ -1,6 +1,6 @@
 /*
 
-   Copyright 2001  The Apache Software Foundation 
+   Copyright 2001,2005  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.
@@ -26,7 +26,7 @@
  * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
  * @version $Id$
  */
-public class SVGTitleElementBridge extends AbstractSVGBridge implements GenericBridge {
+public class SVGTitleElementBridge extends SVGDescriptiveElementBridge {
 
     /**
      * Constructs a new bridge for the &lt;title&gt; element.
@@ -41,16 +41,8 @@
     }
 
     /**
-     * Invoked to handle an <tt>Element</tt> for a given <tt>BridgeContext</tt>.
-     * For example, see the <tt>SVGTitleElementBridge</tt>.
-     *
-     * @param ctx the bridge context to use
-     * @param e the element that describes the graphics node to build
+     * Returns a new instance of this bridge.
      */
-    public void handleElement(BridgeContext ctx, Element e){
-        UserAgent ua = ctx.getUserAgent();
-        ua.handleElement(e, null);
-    }
-
+    public Bridge getInstance() { return new SVGTitleElementBridge(); }
 }
 
diff --git a/sources/org/apache/batik/bridge/SVGUseElementBridge.java b/sources/org/apache/batik/bridge/SVGUseElementBridge.java
index 954663e..cb0d708 100755
--- a/sources/org/apache/batik/bridge/SVGUseElementBridge.java
+++ b/sources/org/apache/batik/bridge/SVGUseElementBridge.java
@@ -112,10 +112,9 @@
 
         Element refElement = ctx.getReferencedElement(e, uri);
 
-        SVGOMDocument document
-            = (SVGOMDocument)e.getOwnerDocument();
-        SVGOMDocument refDocument
-            = (SVGOMDocument)refElement.getOwnerDocument();
+        SVGOMDocument document, refDocument;
+        document    = (SVGOMDocument)e.getOwnerDocument();
+        refDocument = (SVGOMDocument)refElement.getOwnerDocument();
         boolean isLocal = (refDocument == document);
 
         BridgeContext theCtx = ctx;
@@ -127,16 +126,16 @@
         }
             
         // import or clone the referenced element in current document
-        Element localRefElement = (isLocal)
-            ? (Element)refElement.cloneNode(true)
-            : (Element)document.importNode(refElement, true);
+        Element localRefElement;
+        localRefElement = (Element)document.importNode(refElement, true, true);
 
         if (SVG_SYMBOL_TAG.equals(localRefElement.getLocalName())) {
             // The referenced 'symbol' and its contents are deep-cloned into
             // the generated tree, with the exception that the 'symbol'  is
             // replaced by an 'svg'.
-            Element svgElement
-                = document.createElementNS(SVG_NAMESPACE_URI, SVG_SVG_TAG);
+            Element svgElement = document.createElementNS(SVG_NAMESPACE_URI, 
+                                                          SVG_SVG_TAG);
+
             // move the attributes from <symbol> to the <svg> element
             NamedNodeMap attrs = localRefElement.getAttributes();
             int len = attrs.getLength();
diff --git a/sources/org/apache/batik/bridge/SVGUtilities.java b/sources/org/apache/batik/bridge/SVGUtilities.java
index 2bfd49e..744b085 100644
--- a/sources/org/apache/batik/bridge/SVGUtilities.java
+++ b/sources/org/apache/batik/bridge/SVGUtilities.java
@@ -575,7 +575,6 @@
     * @param filterElement the filter element that defines the attributes
     * @param filteredElement the element referencing the filter
     * @param filteredNode the graphics node to filter (objectBoundingBox)
-    * @param uctx the unit processor context (userSpaceOnUse)
     * @param ctx the bridge context
     */
    public static
@@ -991,7 +990,6 @@
      * @param hStr the height of the region
      * @param targetNode the graphics node (needed for objectBoundingBox)
      * @param uctx the unit processor context (needed for userSpaceOnUse)
-     * @param rc the graphics node render context
      */
     protected static Rectangle2D convertRegion(String xStr,
                                                String yStr,
@@ -1070,7 +1068,6 @@
      * @param Tx the original transformation
      * @param node the graphics node that defines the coordinate
      *             system to move into
-     * @param rc the graphics node render context
      */
     public static AffineTransform toObjectBBox(AffineTransform Tx,
                                                GraphicsNode node) {
@@ -1092,7 +1089,6 @@
      * @param r the original Rectangle2D
      * @param node the graphics node that defines the coordinate
      *             system to move into
-     * @param rc the graphics node render context
      */
     public static Rectangle2D toObjectBBox(Rectangle2D r,
                                            GraphicsNode node) {
diff --git a/sources/org/apache/batik/bridge/ScriptingEnvironment.java b/sources/org/apache/batik/bridge/ScriptingEnvironment.java
index aafbcd6..96b0c3e 100644
--- a/sources/org/apache/batik/bridge/ScriptingEnvironment.java
+++ b/sources/org/apache/batik/bridge/ScriptingEnvironment.java
@@ -1034,18 +1034,20 @@
         }
 
 
-        public void postURL(String uri, String content, URLResponseHandler h) {
+        public void postURL(String uri, String content, 
+                            org.apache.batik.script.Window.URLResponseHandler h) {
             postURL(uri, content, h, "text/plain", null);
         }
 
-        public void postURL(String uri, String content, URLResponseHandler h, 
+        public void postURL(String uri, String content, 
+                            org.apache.batik.script.Window.URLResponseHandler h, 
                      String mimeType) {
             postURL(uri, content, h, mimeType, null);
         }
 
         public void postURL(final String uri, 
                             final String content, 
-                            final URLResponseHandler h, 
+                            final org.apache.batik.script.Window.URLResponseHandler h, 
                             final String mimeType, 
                             final String fEnc) {
             Thread t = new Thread() {
diff --git a/sources/org/apache/batik/bridge/TextUtilities.java b/sources/org/apache/batik/bridge/TextUtilities.java
index 5d13ba7..b161f82 100644
--- a/sources/org/apache/batik/bridge/TextUtilities.java
+++ b/sources/org/apache/batik/bridge/TextUtilities.java
@@ -32,8 +32,8 @@
 /**
  * A collection of utility method for text.
  *
- * @author <a href="stephane@hillion.org">Stephane Hillion</a>
- * @author <a href="bill.haneman@ireland.sun.com>Bill Haneman</a>
+ * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
  * @version $Id$
  */
 public abstract class TextUtilities implements CSSConstants, ErrorConstants {
diff --git a/sources/org/apache/batik/bridge/UpdateManager.java b/sources/org/apache/batik/bridge/UpdateManager.java
index b07793f..95dccc0 100644
--- a/sources/org/apache/batik/bridge/UpdateManager.java
+++ b/sources/org/apache/batik/bridge/UpdateManager.java
@@ -359,7 +359,8 @@
      * @param u2d The user to device transform.
      * @param dbr Whether the double buffering should be used.
      * @param aoi The area of interest in the renderer space units.
-     * @param width&nbsp;height The offscreen buffer size.
+     * @param width The offscreen buffer width.
+     * @param height The offscreen buffer height.
      */
     public void updateRendering(AffineTransform u2d,
                                 boolean dbr,
@@ -380,7 +381,8 @@
      * @param cpt If the canvas painting transform should be cleared
      *            when the update complets
      * @param aoi The area of interest in the renderer space units.
-     * @param width&nbsp;height The offscreen buffer size.
+     * @param width The offscreen buffer width.
+     * @param height The offscreen buffer height.
      */
     public void updateRendering(AffineTransform u2d,
                                 boolean dbr,
@@ -396,7 +398,9 @@
 
     /**
      * Updates the rendering buffer.
-     * @param aoi The area of interest in the renderer space units.
+     * @param areas List of areas of interest in rederer space units.
+     * @param clearPaintingTransform Indicates if the painting transform
+     *        should be cleared as a result of this update.
      */
     protected void updateRendering(List areas, 
                                    boolean clearPaintingTransform) {
diff --git a/sources/org/apache/batik/bridge/UpdateManagerEvent.java b/sources/org/apache/batik/bridge/UpdateManagerEvent.java
index 246ae28..628929f 100644
--- a/sources/org/apache/batik/bridge/UpdateManagerEvent.java
+++ b/sources/org/apache/batik/bridge/UpdateManagerEvent.java
@@ -51,9 +51,7 @@
      * @param source the object that originated the event, ie. the
      *               UpdateManager.
      * @param bi the image to paint.
-     * @param r The dirty area.
-     * @param cpt Indicates if the painting transform should be
-     *            cleared as a result of this event.
+     * @param das List of dirty areas.
      */
     public UpdateManagerEvent(Object source, BufferedImage bi, 
                               List das) {
@@ -68,7 +66,7 @@
      * @param source the object that originated the event, ie. the
      *               UpdateManager.
      * @param bi the image to paint.
-     * @param r The dirty area.
+     * @param das List of dirty areas.
      * @param cpt Indicates if the painting transform should be
      *            cleared as a result of this event.
      */
diff --git a/sources/org/apache/batik/bridge/UserAgent.java b/sources/org/apache/batik/bridge/UserAgent.java
index 2804934..c660bf7 100644
--- a/sources/org/apache/batik/bridge/UserAgent.java
+++ b/sources/org/apache/batik/bridge/UserAgent.java
@@ -275,12 +275,12 @@
      * on the ExternalResourceSecurity strategy returned by 
      * getExternalResourceSecurity.
      *
-     * @param scriptURL url for the script, as defined in
-     *        the script's xlink:href attribute. If that
+     * @param resourceURL url for the resource, as defined in
+     *        the resource's xlink:href attribute. If that
      *        attribute was empty, then this parameter should
      *        be null
      * @param docURL url for the document into which the 
-     *        script was found.
+     *        resource was found.
      */
     void checkLoadExternalResource(ParsedURL resourceURL,
                                    ParsedURL docURL) throws SecurityException;
diff --git a/sources/org/apache/batik/bridge/UserAgentAdapter.java b/sources/org/apache/batik/bridge/UserAgentAdapter.java
index d4832c9..c6e043e 100644
--- a/sources/org/apache/batik/bridge/UserAgentAdapter.java
+++ b/sources/org/apache/batik/bridge/UserAgentAdapter.java
@@ -302,9 +302,9 @@
      *        script was found.
      */
     public ScriptSecurity getScriptSecurity(String    scriptType,
-                                            ParsedURL scriptPURL,
-                                            ParsedURL docPURL){
-        return new DefaultScriptSecurity(scriptType, scriptPURL, docPURL);
+                                            ParsedURL scriptURL,
+                                            ParsedURL docURL){
+        return new DefaultScriptSecurity(scriptType, scriptURL, docURL);
     }
     
     /**
@@ -348,9 +348,9 @@
      *        resource was found.
      */
     public ExternalResourceSecurity 
-        getExternalResourceSecurity(ParsedURL resourcePURL,
+        getExternalResourceSecurity(ParsedURL resourceURL,
                                     ParsedURL docURL) {
-        return new RelaxedExternalResourceSecurity(resourcePURL, docURL);
+        return new RelaxedExternalResourceSecurity(resourceURL, docURL);
     }
     
     /**
@@ -362,12 +362,12 @@
      * on the ExternalResourceSecurity strategy returned by 
      * getExternalResourceSecurity.
      *
-     * @param scriptURL url for the script, as defined in
-     *        the script's xlink:href attribute. If that
+     * @param resourceURL url for the resource, as defined in
+     *        the resource's xlink:href attribute. If that
      *        attribute was empty, then this parameter should
      *        be null
      * @param docURL url for the document into which the 
-     *        script was found.
+     *        resource was found.
      */
     public void 
         checkLoadExternalResource(ParsedURL resourceURL,
diff --git a/sources/org/apache/batik/bridge/ViewBox.java b/sources/org/apache/batik/bridge/ViewBox.java
index ad65d7f..a997c24 100644
--- a/sources/org/apache/batik/bridge/ViewBox.java
+++ b/sources/org/apache/batik/bridge/ViewBox.java
@@ -405,8 +405,10 @@
 
         /**
          * Invoked when 'viewBox(x,y,width,height)' has been parsed.
-         * @param x&nbsp;y&nbsp;width&nbsp;height the coordinates of the
-         * viewbox.
+         * @param x the viewbox x coordinate
+         * @param y the viewbox y coordinate
+         * @param width the viewbox width
+         * @param height the viewbox height
          * @exception ParseException if an error occured while processing the
          *                           fragment identifier
          */
diff --git a/sources/org/apache/batik/bridge/svg12/SVG12BridgeExtension.java b/sources/org/apache/batik/bridge/svg12/SVG12BridgeExtension.java
index 9ad99da..cf724d5 100644
--- a/sources/org/apache/batik/bridge/svg12/SVG12BridgeExtension.java
+++ b/sources/org/apache/batik/bridge/svg12/SVG12BridgeExtension.java
@@ -1,6 +1,6 @@
 /*
 
-   Copyright 2001-2002,2004  The Apache Software Foundation 
+   Copyright 2001-2002,2004-2005  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.
@@ -62,7 +62,7 @@
      * This should contain a contact address (usually an e-mail address).
      */
     public String getContactAddress() {
-        return "batik-dev@xml.apache.org";
+        return "batik-dev@xmlgraphics.apache.org";
     }
 
     /**
diff --git a/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java b/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java
index ecc8f71..d2028f1 100644
--- a/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java
+++ b/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java
@@ -76,7 +76,7 @@
 /**
  * Bridge class for the &lt;flowRoot> element.
  *
- * @author <a href="deweese@apache.org">Thomas DeWeese</a>
+ * @author <a href="mailto:deweese@apache.org">Thomas DeWeese</a>
  * @version $Id$
  */
 public class SVGFlowRootElementBridge extends SVGTextElementBridge {
diff --git a/sources/org/apache/batik/bridge/svg12/SVGMultiImageElementBridge.java b/sources/org/apache/batik/bridge/svg12/SVGMultiImageElementBridge.java
index aaef20d..c5d6e64 100644
--- a/sources/org/apache/batik/bridge/svg12/SVGMultiImageElementBridge.java
+++ b/sources/org/apache/batik/bridge/svg12/SVGMultiImageElementBridge.java
@@ -361,7 +361,6 @@
 
         /**
          * Constructs a new viewport with the specified <tt>SVGSVGElement</tt>.
-         * @param e the SVGSVGElement that defines this viewport
          * @param w the width of the viewport
          * @param h the height of the viewport
          */
diff --git a/sources/org/apache/batik/css/dom/CSSOMSVGColor.java b/sources/org/apache/batik/css/dom/CSSOMSVGColor.java
index bd152bc..f539111 100644
--- a/sources/org/apache/batik/css/dom/CSSOMSVGColor.java
+++ b/sources/org/apache/batik/css/dom/CSSOMSVGColor.java
@@ -22,6 +22,8 @@
 import org.apache.batik.css.engine.value.FloatValue;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.svg.ICCColor;
+import org.apache.batik.util.CSSConstants;
+
 import org.w3c.dom.DOMException;
 import org.w3c.dom.css.CSSPrimitiveValue;
 import org.w3c.dom.css.CSSValue;
@@ -127,8 +129,12 @@
         switch (value.getCssValueType()) {
         case CSSValue.CSS_PRIMITIVE_VALUE:
             switch (value.getPrimitiveType()) {
-            case CSSPrimitiveValue.CSS_IDENT:
-                return SVG_COLORTYPE_CURRENTCOLOR;
+            case CSSPrimitiveValue.CSS_IDENT: {
+                if (value.getStringValue().equalsIgnoreCase
+                    (CSSConstants.CSS_CURRENTCOLOR_VALUE))
+                    return SVG_COLORTYPE_CURRENTCOLOR;
+                return SVG_COLORTYPE_RGBCOLOR;
+            }
             case CSSPrimitiveValue.CSS_RGBCOLOR:
                 return SVG_COLORTYPE_RGBCOLOR;
             }
@@ -149,6 +155,14 @@
     }
 
     /**
+     * Returns the RGBColor value for this SVGColor.
+     * For the SVG 1.1 ECMAScript binding.
+     */
+    public RGBColor getRgbColor() {
+        return this;
+    }
+
+    /**
      * <b>DOM</b>: Implements {@link
      * org.w3c.dom.svg.SVGColor#setRGBColor(String)}.
      */
@@ -170,6 +184,14 @@
     }
 
     /**
+     * Returns the SVGICCColor value of this SVGColor.
+     * For the SVG 1.1 ECMAScript binding.
+     */
+    public SVGICCColor getIccColor() {
+        return this;
+    }
+
+    /**
      * <b>DOM</b>: Implements {@link
      * org.w3c.dom.svg.SVGColor#setRGBColorICCColor(String,String)}.
      */
@@ -817,7 +839,7 @@
             throws DOMException {
             switch (type) {
             case SVG_COLORTYPE_CURRENTCOLOR:
-                textChanged("currentcolor");
+                textChanged(CSSConstants.CSS_CURRENTCOLOR_VALUE);
                 break;
 
             case SVG_COLORTYPE_RGBCOLOR:
diff --git a/sources/org/apache/batik/css/dom/CSSOMSVGPaint.java b/sources/org/apache/batik/css/dom/CSSOMSVGPaint.java
index cc77c01..a099d79 100644
--- a/sources/org/apache/batik/css/dom/CSSOMSVGPaint.java
+++ b/sources/org/apache/batik/css/dom/CSSOMSVGPaint.java
@@ -20,6 +20,8 @@
 import org.apache.batik.css.engine.value.FloatValue;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.svg.ICCColor;
+import org.apache.batik.util.CSSConstants;
+
 import org.w3c.dom.DOMException;
 import org.w3c.dom.css.CSSPrimitiveValue;
 import org.w3c.dom.css.CSSValue;
@@ -67,12 +69,16 @@
         switch (value.getCssValueType()) {
         case CSSValue.CSS_PRIMITIVE_VALUE:
             switch (value.getPrimitiveType()) {
-            case CSSPrimitiveValue.CSS_IDENT:
-                if (value.getStringValue().equalsIgnoreCase("none")) {
+            case CSSPrimitiveValue.CSS_IDENT: {
+                String str = value.getStringValue();
+                if (str.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) {
                     return SVG_PAINTTYPE_NONE;
+                } else if (str.equalsIgnoreCase
+                           (CSSConstants.CSS_CURRENTCOLOR_VALUE)) {
+                    return SVG_PAINTTYPE_CURRENTCOLOR;
                 }
-                return SVG_PAINTTYPE_CURRENTCOLOR;
-
+                return SVG_PAINTTYPE_RGBCOLOR;
+            }
             case CSSPrimitiveValue.CSS_RGBCOLOR:
                 return SVG_PAINTTYPE_RGBCOLOR;
 
@@ -85,26 +91,33 @@
             Value v0 = value.item(0);
             Value v1 = value.item(1);
             switch (v0.getPrimitiveType()) {
+            case CSSPrimitiveValue.CSS_IDENT:
+                return SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR;
             case CSSPrimitiveValue.CSS_URI:
-                switch (v1.getPrimitiveType()) {
-                case CSSPrimitiveValue.CSS_IDENT:
-                    if (value.getStringValue().equalsIgnoreCase("none")) {
-                        return SVG_PAINTTYPE_URI_NONE;
-                    }
-                    return SVG_PAINTTYPE_URI_CURRENTCOLOR;
+                if (v1.getCssValueType() == CSSValue.CSS_VALUE_LIST)
+                    // Should probably check this more deeply...
+                    return SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR;
 
-                case CSSPrimitiveValue.CSS_RGBCOLOR:
-                    if (value.getLength() == 3) {
-                        return SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR;
+                switch (v1.getPrimitiveType()) {
+                case CSSPrimitiveValue.CSS_IDENT: {
+                    String str = v1.getStringValue();
+                    if (str.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) {
+                        return SVG_PAINTTYPE_URI_NONE;
+                    } else if (str.equalsIgnoreCase
+                               (CSSConstants.CSS_CURRENTCOLOR_VALUE)) {
+                        return SVG_PAINTTYPE_URI_CURRENTCOLOR;
                     }
                     return SVG_PAINTTYPE_URI_RGBCOLOR;
                 }
+                case CSSPrimitiveValue.CSS_RGBCOLOR:
+                    return SVG_PAINTTYPE_URI_RGBCOLOR;
+                }
 
             case CSSPrimitiveValue.CSS_RGBCOLOR:
                 return SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR;
             }
         }
-        throw new InternalError();
+        return SVG_PAINTTYPE_UNKNOWN;
     }
 
     /**
diff --git a/sources/org/apache/batik/css/engine/CSSContext.java b/sources/org/apache/batik/css/engine/CSSContext.java
index 587f7e2..57e4409 100644
--- a/sources/org/apache/batik/css/engine/CSSContext.java
+++ b/sources/org/apache/batik/css/engine/CSSContext.java
@@ -83,12 +83,12 @@
      * This method should throw a SecurityException if the resource
      * found at url and referenced from docURL should not be loaded.
      * 
-     * @param scriptURL url for the script, as defined in
-     *        the script's xlink:href attribute. If that
+     * @param resourceURL url for the resource, as defined in
+     *        the resource's xlink:href attribute. If that
      *        attribute was empty, then this parameter should
      *        be null
      * @param docURL url for the document into which the 
-     *        script was found.
+     *        resource was found.
      */
     public void 
         checkLoadExternalResource(ParsedURL resourceURL,
diff --git a/sources/org/apache/batik/css/engine/CSSEngineUserAgent.java b/sources/org/apache/batik/css/engine/CSSEngineUserAgent.java
index 5cfd5f7..c665711 100644
--- a/sources/org/apache/batik/css/engine/CSSEngineUserAgent.java
+++ b/sources/org/apache/batik/css/engine/CSSEngineUserAgent.java
@@ -22,7 +22,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public interface CSSEngineUserAgent {
diff --git a/sources/org/apache/batik/css/engine/FontFaceRule.java b/sources/org/apache/batik/css/engine/FontFaceRule.java
index 9b65f5a..5f6d117 100644
--- a/sources/org/apache/batik/css/engine/FontFaceRule.java
+++ b/sources/org/apache/batik/css/engine/FontFaceRule.java
@@ -25,7 +25,7 @@
  * This mostly exists to give us a place to store the 
  * URI to be used for 'src' URI resolution.
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class FontFaceRule implements Rule {
diff --git a/sources/org/apache/batik/css/engine/StyleDeclaration.java b/sources/org/apache/batik/css/engine/StyleDeclaration.java
index c8b4db7..6146ee6 100644
--- a/sources/org/apache/batik/css/engine/StyleDeclaration.java
+++ b/sources/org/apache/batik/css/engine/StyleDeclaration.java
@@ -115,8 +115,19 @@
             indexes    = newidx;
             priorities = newprio;
         }
-        values[count]     = v;
-        indexes[count]    = idx;
+        for (int i = 0; i < count; i++) {
+            if (indexes[i] == idx) {
+                // Replace existing property values, 
+                // unless they are important!
+                if (prio || (priorities[i] == prio)) {
+                    values    [i] = v;
+                    priorities[i] = prio;
+                }
+                return;
+            }
+        }
+        values    [count] = v;
+        indexes   [count] = idx;
         priorities[count] = prio;
         count++;
     }
diff --git a/sources/org/apache/batik/css/engine/sac/CSSDescendantSelector.java b/sources/org/apache/batik/css/engine/sac/CSSDescendantSelector.java
index c3ca73d..289bbff 100644
--- a/sources/org/apache/batik/css/engine/sac/CSSDescendantSelector.java
+++ b/sources/org/apache/batik/css/engine/sac/CSSDescendantSelector.java
@@ -53,11 +53,12 @@
      */
     public boolean match(Element e, String pseudoE) {
 	ExtendedSelector p = (ExtendedSelector)getAncestorSelector();
+        if (!((ExtendedSelector)getSimpleSelector()).match(e,pseudoE))
+            return false;
 	for (Node n = e.getParentNode(); n != null; n = n.getParentNode()) {
             if (n.getNodeType() == Node.ELEMENT_NODE &&
                 p.match((Element)n, null)) {
-                return ((ExtendedSelector)getSimpleSelector()).match(e,
-                                                                     pseudoE);
+                return true;
             }
 	}
 	return false;
diff --git a/sources/org/apache/batik/css/engine/sac/CSSDirectAdjacentSelector.java b/sources/org/apache/batik/css/engine/sac/CSSDirectAdjacentSelector.java
index dc2448b..976d870 100644
--- a/sources/org/apache/batik/css/engine/sac/CSSDirectAdjacentSelector.java
+++ b/sources/org/apache/batik/css/engine/sac/CSSDirectAdjacentSelector.java
@@ -56,14 +56,15 @@
      */
     public boolean match(Element e, String pseudoE) {
 	Node n = e;
+        if (!((ExtendedSelector)getSiblingSelector()).match(e, pseudoE))
+            return false;
         while ((n = n.getPreviousSibling()) != null &&
                n.getNodeType() != Node.ELEMENT_NODE);
-	if (n != null) {
-	    return ((ExtendedSelector)getSelector()).match((Element)n,
-                                                                 null) &&
-		   ((ExtendedSelector)getSiblingSelector()).match(e, pseudoE);
-	}	
-	return false;
+
+	if (n == null) 
+            return false;
+
+        return ((ExtendedSelector)getSelector()).match((Element)n, null);
     }
 
     /**
diff --git a/sources/org/apache/batik/css/engine/sac/CSSElementSelector.java b/sources/org/apache/batik/css/engine/sac/CSSElementSelector.java
index 3dc9e05..bd25b5b 100644
--- a/sources/org/apache/batik/css/engine/sac/CSSElementSelector.java
+++ b/sources/org/apache/batik/css/engine/sac/CSSElementSelector.java
@@ -50,9 +50,14 @@
 	if (name == null) {
 	    return true;
 	}
-	return (e.getPrefix() == null)
-	    ? e.getNodeName().equalsIgnoreCase(name)
-	    : e.getLocalName().equalsIgnoreCase(name);
+        String eName;
+        if (e.getPrefix() == null) eName = e.getNodeName();
+        else                       eName = e.getLocalName();
+        // According to CSS 2 section 5.1 element
+        // names in selectors are case-sensitive for XML.
+        return eName.equals(name);
+        // For HTML
+        // return eName.equalsIgnoreCase(name);
     }
 
     /**
diff --git a/sources/org/apache/batik/css/engine/value/ShorthandManager.java b/sources/org/apache/batik/css/engine/value/ShorthandManager.java
index bed9b79..23e3f16 100644
--- a/sources/org/apache/batik/css/engine/value/ShorthandManager.java
+++ b/sources/org/apache/batik/css/engine/value/ShorthandManager.java
@@ -42,7 +42,6 @@
      * @param ph   The property handler to use.
      * @param lu   The SAC lexical unit used to create the value.
      * @param imp  The property priority.
-     * @param base The base URL.
      */
     void setValues(CSSEngine eng,
                    PropertyHandler ph,
diff --git a/sources/org/apache/batik/css/engine/value/ValueManager.java b/sources/org/apache/batik/css/engine/value/ValueManager.java
index 94437ee..1b4c7e8 100644
--- a/sources/org/apache/batik/css/engine/value/ValueManager.java
+++ b/sources/org/apache/batik/css/engine/value/ValueManager.java
@@ -69,7 +69,7 @@
      * @param type   A string code as defined in CSSPrimitiveValue. The string
      *               code can only be a string unit type.
      * @param value  The new string value.
-     * @param base   The base URL.
+     * @param engine The CSS engine.
      */
     Value createStringValue(short type, String value, CSSEngine engine)
         throws DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/css2/ClipManager.java b/sources/org/apache/batik/css/engine/value/css2/ClipManager.java
index 018fa43..2308f59 100644
--- a/sources/org/apache/batik/css/engine/value/css2/ClipManager.java
+++ b/sources/org/apache/batik/css/engine/value/css2/ClipManager.java
@@ -22,6 +22,7 @@
 import org.apache.batik.css.engine.value.RectManager;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/css2/CursorManager.java b/sources/org/apache/batik/css/engine/value/css2/CursorManager.java
index 24d4ae3..620a4be 100644
--- a/sources/org/apache/batik/css/engine/value/css2/CursorManager.java
+++ b/sources/org/apache/batik/css/engine/value/css2/CursorManager.java
@@ -26,6 +26,7 @@
 import org.apache.batik.css.engine.value.URIValue;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/css2/FontFamilyManager.java b/sources/org/apache/batik/css/engine/value/css2/FontFamilyManager.java
index 4da675f..d98d469 100644
--- a/sources/org/apache/batik/css/engine/value/css2/FontFamilyManager.java
+++ b/sources/org/apache/batik/css/engine/value/css2/FontFamilyManager.java
@@ -27,6 +27,7 @@
 import org.apache.batik.css.engine.value.StringValue;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/css2/FontShorthandManager.java b/sources/org/apache/batik/css/engine/value/css2/FontShorthandManager.java
index 449c882..eaa7c79 100644
--- a/sources/org/apache/batik/css/engine/value/css2/FontShorthandManager.java
+++ b/sources/org/apache/batik/css/engine/value/css2/FontShorthandManager.java
@@ -47,7 +47,7 @@
  * before an 'ident' or '/' to be font-size and any preceeding
  * number to be font-weight.
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class FontShorthandManager     
diff --git a/sources/org/apache/batik/css/engine/value/css2/FontSizeAdjustManager.java b/sources/org/apache/batik/css/engine/value/css2/FontSizeAdjustManager.java
index ca3a45c..47ce1bc 100644
--- a/sources/org/apache/batik/css/engine/value/css2/FontSizeAdjustManager.java
+++ b/sources/org/apache/batik/css/engine/value/css2/FontSizeAdjustManager.java
@@ -22,6 +22,7 @@
 import org.apache.batik.css.engine.value.FloatValue;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/css2/FontSizeManager.java b/sources/org/apache/batik/css/engine/value/css2/FontSizeManager.java
index 6490442..ba67ec3 100644
--- a/sources/org/apache/batik/css/engine/value/css2/FontSizeManager.java
+++ b/sources/org/apache/batik/css/engine/value/css2/FontSizeManager.java
@@ -22,10 +22,12 @@
 import org.apache.batik.css.engine.CSSStylableElement;
 import org.apache.batik.css.engine.StyleMap;
 import org.apache.batik.css.engine.value.FloatValue;
+import org.apache.batik.css.engine.value.IdentifierManager;
 import org.apache.batik.css.engine.value.LengthManager;
 import org.apache.batik.css.engine.value.StringMap;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/css2/FontStretchManager.java b/sources/org/apache/batik/css/engine/value/css2/FontStretchManager.java
index b900081..8d74e37 100644
--- a/sources/org/apache/batik/css/engine/value/css2/FontStretchManager.java
+++ b/sources/org/apache/batik/css/engine/value/css2/FontStretchManager.java
@@ -24,6 +24,7 @@
 import org.apache.batik.css.engine.value.StringMap;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 
 /**
diff --git a/sources/org/apache/batik/css/engine/value/css2/FontWeightManager.java b/sources/org/apache/batik/css/engine/value/css2/FontWeightManager.java
index 920bb7f..3339fbb 100644
--- a/sources/org/apache/batik/css/engine/value/css2/FontWeightManager.java
+++ b/sources/org/apache/batik/css/engine/value/css2/FontWeightManager.java
@@ -25,6 +25,7 @@
 import org.apache.batik.css.engine.value.StringMap;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/css2/SrcManager.java b/sources/org/apache/batik/css/engine/value/css2/SrcManager.java
index f2cfeeb..812ecff 100644
--- a/sources/org/apache/batik/css/engine/value/css2/SrcManager.java
+++ b/sources/org/apache/batik/css/engine/value/css2/SrcManager.java
@@ -25,6 +25,7 @@
 import org.apache.batik.css.engine.value.URIValue;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 
 import org.w3c.dom.css.CSSPrimitiveValue;
@@ -36,7 +37,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class SrcManager extends IdentifierManager {
diff --git a/sources/org/apache/batik/css/engine/value/css2/TextDecorationManager.java b/sources/org/apache/batik/css/engine/value/css2/TextDecorationManager.java
index ad2bc5d..eeaad23 100644
--- a/sources/org/apache/batik/css/engine/value/css2/TextDecorationManager.java
+++ b/sources/org/apache/batik/css/engine/value/css2/TextDecorationManager.java
@@ -23,6 +23,7 @@
 import org.apache.batik.css.engine.value.StringMap;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/BaselineShiftManager.java b/sources/org/apache/batik/css/engine/value/svg/BaselineShiftManager.java
index 0020b83..d501aa3 100644
--- a/sources/org/apache/batik/css/engine/value/svg/BaselineShiftManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/BaselineShiftManager.java
@@ -24,6 +24,7 @@
 import org.apache.batik.css.engine.value.LengthManager;
 import org.apache.batik.css.engine.value.StringMap;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/ClipPathManager.java b/sources/org/apache/batik/css/engine/value/svg/ClipPathManager.java
index 6da0d76..1dce10a 100644
--- a/sources/org/apache/batik/css/engine/value/svg/ClipPathManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/ClipPathManager.java
@@ -22,6 +22,7 @@
 import org.apache.batik.css.engine.value.URIValue;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/ColorProfileManager.java b/sources/org/apache/batik/css/engine/value/svg/ColorProfileManager.java
index c7807ec..4cd9809 100644
--- a/sources/org/apache/batik/css/engine/value/svg/ColorProfileManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/ColorProfileManager.java
@@ -22,6 +22,7 @@
 import org.apache.batik.css.engine.value.StringValue;
 import org.apache.batik.css.engine.value.URIValue;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/EnableBackgroundManager.java b/sources/org/apache/batik/css/engine/value/svg/EnableBackgroundManager.java
index 2937da7..faa9c23 100644
--- a/sources/org/apache/batik/css/engine/value/svg/EnableBackgroundManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/EnableBackgroundManager.java
@@ -23,6 +23,7 @@
 import org.apache.batik.css.engine.value.LengthManager;
 import org.apache.batik.css.engine.value.ListValue;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/FilterManager.java b/sources/org/apache/batik/css/engine/value/svg/FilterManager.java
index f9882ac..433838d 100644
--- a/sources/org/apache/batik/css/engine/value/svg/FilterManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/FilterManager.java
@@ -21,6 +21,7 @@
 import org.apache.batik.css.engine.value.AbstractValueManager;
 import org.apache.batik.css.engine.value.URIValue;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/GlyphOrientationManager.java b/sources/org/apache/batik/css/engine/value/svg/GlyphOrientationManager.java
index a72c19b..52f5e4c 100644
--- a/sources/org/apache/batik/css/engine/value/svg/GlyphOrientationManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/GlyphOrientationManager.java
@@ -21,6 +21,7 @@
 import org.apache.batik.css.engine.value.AbstractValueManager;
 import org.apache.batik.css.engine.value.FloatValue;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.css.CSSPrimitiveValue;
diff --git a/sources/org/apache/batik/css/engine/value/svg/GlyphOrientationVerticalManager.java b/sources/org/apache/batik/css/engine/value/svg/GlyphOrientationVerticalManager.java
index f8cd441..76daadb 100644
--- a/sources/org/apache/batik/css/engine/value/svg/GlyphOrientationVerticalManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/GlyphOrientationVerticalManager.java
@@ -19,6 +19,7 @@
 
 import org.apache.batik.css.engine.CSSEngine;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/KerningManager.java b/sources/org/apache/batik/css/engine/value/svg/KerningManager.java
index 4b64b69..1bf5755 100644
--- a/sources/org/apache/batik/css/engine/value/svg/KerningManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/KerningManager.java
@@ -20,6 +20,7 @@
 import org.apache.batik.css.engine.CSSEngine;
 import org.apache.batik.css.engine.value.LengthManager;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/MarkerManager.java b/sources/org/apache/batik/css/engine/value/svg/MarkerManager.java
index 5e2930f..50a06c9 100644
--- a/sources/org/apache/batik/css/engine/value/svg/MarkerManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/MarkerManager.java
@@ -22,6 +22,7 @@
 import org.apache.batik.css.engine.value.URIValue;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/MarkerShorthandManager.java b/sources/org/apache/batik/css/engine/value/svg/MarkerShorthandManager.java
index a2122c5..590a0cb 100644
--- a/sources/org/apache/batik/css/engine/value/svg/MarkerShorthandManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/MarkerShorthandManager.java
@@ -20,6 +20,7 @@
 import org.apache.batik.css.engine.CSSEngine;
 import org.apache.batik.css.engine.value.AbstractValueFactory;
 import org.apache.batik.css.engine.value.ShorthandManager;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/MaskManager.java b/sources/org/apache/batik/css/engine/value/svg/MaskManager.java
index 890b73e..1ffff2c 100644
--- a/sources/org/apache/batik/css/engine/value/svg/MaskManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/MaskManager.java
@@ -22,6 +22,7 @@
 import org.apache.batik.css.engine.value.URIValue;
 import org.apache.batik.css.engine.value.Value;
 import org.apache.batik.css.engine.value.ValueConstants;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/OpacityManager.java b/sources/org/apache/batik/css/engine/value/svg/OpacityManager.java
index 315ed2a..9793e89 100644
--- a/sources/org/apache/batik/css/engine/value/svg/OpacityManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/OpacityManager.java
@@ -21,6 +21,7 @@
 import org.apache.batik.css.engine.value.AbstractValueManager;
 import org.apache.batik.css.engine.value.FloatValue;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.css.CSSPrimitiveValue;
diff --git a/sources/org/apache/batik/css/engine/value/svg/SVGColorManager.java b/sources/org/apache/batik/css/engine/value/svg/SVGColorManager.java
index 16c9fac..98fcc4c 100644
--- a/sources/org/apache/batik/css/engine/value/svg/SVGColorManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/SVGColorManager.java
@@ -22,6 +22,7 @@
 import org.apache.batik.css.engine.StyleMap;
 import org.apache.batik.css.engine.value.ListValue;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/SVGPaintManager.java b/sources/org/apache/batik/css/engine/value/svg/SVGPaintManager.java
index ae56040..87ac750 100644
--- a/sources/org/apache/batik/css/engine/value/svg/SVGPaintManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/SVGPaintManager.java
@@ -23,6 +23,7 @@
 import org.apache.batik.css.engine.value.ListValue;
 import org.apache.batik.css.engine.value.URIValue;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.css.CSSPrimitiveValue;
@@ -47,7 +48,7 @@
     /**
      * Creates a new SVGPaintManager.
      * @param prop The property name.
-     * @param val The default value.
+     * @param v The default value.
      */
     public SVGPaintManager(String prop, Value v) {
         super(prop, v);
diff --git a/sources/org/apache/batik/css/engine/value/svg/SpacingManager.java b/sources/org/apache/batik/css/engine/value/svg/SpacingManager.java
index e9ebd6c..eebe3ae 100644
--- a/sources/org/apache/batik/css/engine/value/svg/SpacingManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/SpacingManager.java
@@ -20,6 +20,7 @@
 import org.apache.batik.css.engine.CSSEngine;
 import org.apache.batik.css.engine.value.LengthManager;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/StrokeDasharrayManager.java b/sources/org/apache/batik/css/engine/value/svg/StrokeDasharrayManager.java
index cf164f7..43cced0 100644
--- a/sources/org/apache/batik/css/engine/value/svg/StrokeDasharrayManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/StrokeDasharrayManager.java
@@ -23,6 +23,7 @@
 import org.apache.batik.css.engine.value.LengthManager;
 import org.apache.batik.css.engine.value.ListValue;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/StrokeDashoffsetManager.java b/sources/org/apache/batik/css/engine/value/svg/StrokeDashoffsetManager.java
index c308c6a..25cada7 100644
--- a/sources/org/apache/batik/css/engine/value/svg/StrokeDashoffsetManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/StrokeDashoffsetManager.java
@@ -20,6 +20,7 @@
 import org.apache.batik.css.engine.CSSEngine;
 import org.apache.batik.css.engine.value.LengthManager;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/StrokeMiterlimitManager.java b/sources/org/apache/batik/css/engine/value/svg/StrokeMiterlimitManager.java
index fc585a4..bbcf73d 100644
--- a/sources/org/apache/batik/css/engine/value/svg/StrokeMiterlimitManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/StrokeMiterlimitManager.java
@@ -21,6 +21,7 @@
 import org.apache.batik.css.engine.value.AbstractValueManager;
 import org.apache.batik.css.engine.value.FloatValue;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg/StrokeWidthManager.java b/sources/org/apache/batik/css/engine/value/svg/StrokeWidthManager.java
index 3ebb570..e2f4867 100644
--- a/sources/org/apache/batik/css/engine/value/svg/StrokeWidthManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg/StrokeWidthManager.java
@@ -20,6 +20,7 @@
 import org.apache.batik.css.engine.CSSEngine;
 import org.apache.batik.css.engine.value.LengthManager;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg12/LineHeightManager.java b/sources/org/apache/batik/css/engine/value/svg12/LineHeightManager.java
index 0c89442..efca82e 100644
--- a/sources/org/apache/batik/css/engine/value/svg12/LineHeightManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg12/LineHeightManager.java
@@ -25,6 +25,7 @@
 import org.apache.batik.css.engine.value.FloatValue;
 import org.apache.batik.css.engine.value.svg12.SVG12ValueConstants;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.SVG12CSSConstants;
 
 import org.w3c.css.sac.LexicalUnit;
diff --git a/sources/org/apache/batik/css/engine/value/svg12/MarginLengthManager.java b/sources/org/apache/batik/css/engine/value/svg12/MarginLengthManager.java
index e0fab70..d1d4d1c 100644
--- a/sources/org/apache/batik/css/engine/value/svg12/MarginLengthManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg12/MarginLengthManager.java
@@ -21,6 +21,7 @@
 import org.apache.batik.css.engine.CSSEngine;
 import org.apache.batik.css.engine.value.LengthManager;
 import org.apache.batik.css.engine.value.Value;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.css.engine.value.svg.SVGValueConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg12/MarginShorthandManager.java b/sources/org/apache/batik/css/engine/value/svg12/MarginShorthandManager.java
index da61d26..4ded1c0 100644
--- a/sources/org/apache/batik/css/engine/value/svg12/MarginShorthandManager.java
+++ b/sources/org/apache/batik/css/engine/value/svg12/MarginShorthandManager.java
@@ -20,6 +20,7 @@
 import org.apache.batik.css.engine.CSSEngine;
 import org.apache.batik.css.engine.value.AbstractValueFactory;
 import org.apache.batik.css.engine.value.ShorthandManager;
+import org.apache.batik.css.engine.value.ValueManager;
 import org.apache.batik.util.SVG12CSSConstants;
 import org.w3c.css.sac.LexicalUnit;
 import org.w3c.dom.DOMException;
diff --git a/sources/org/apache/batik/css/engine/value/svg12/SVG12ValueConstants.java b/sources/org/apache/batik/css/engine/value/svg12/SVG12ValueConstants.java
index 2186754..376addb 100644
--- a/sources/org/apache/batik/css/engine/value/svg12/SVG12ValueConstants.java
+++ b/sources/org/apache/batik/css/engine/value/svg12/SVG12ValueConstants.java
@@ -29,7 +29,7 @@
 /**
  * This interface provides constants for SVG 1.2 values.
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public interface SVG12ValueConstants extends SVGValueConstants {
diff --git a/sources/org/apache/batik/css/parser/ExtendedParser.java b/sources/org/apache/batik/css/parser/ExtendedParser.java
index c0d09c5..696f3dd 100644
--- a/sources/org/apache/batik/css/parser/ExtendedParser.java
+++ b/sources/org/apache/batik/css/parser/ExtendedParser.java
@@ -36,7 +36,7 @@
     /**
      * Parse a CSS style declaration (without '{' and '}').
      *
-     * @param styleValue The declaration.
+     * @param source The declaration.
      * @exception CSSException Any CSS exception, possibly
      *            wrapping another exception.
      * @exception java.io.IOException An IO exception from the parser,
@@ -100,7 +100,7 @@
         throws CSSException, IOException;
 
     /**
-     * Parse a CSS priority value (e.g. "!important").
+     * Parse a CSS priority value (e&#x2e;g&#x2e; "&#x21;important").
      * 
      * 
      * @exception CSSException Any CSS exception, possibly
diff --git a/sources/org/apache/batik/css/parser/ExtendedParserWrapper.java b/sources/org/apache/batik/css/parser/ExtendedParserWrapper.java
index 4aa5411..985f367 100644
--- a/sources/org/apache/batik/css/parser/ExtendedParserWrapper.java
+++ b/sources/org/apache/batik/css/parser/ExtendedParserWrapper.java
@@ -156,7 +156,7 @@
     /**
      * Parse a CSS style declaration (without '{' and '}').
      *
-     * @param styleValue The declaration.
+     * @param source The declaration.
      * @exception CSSException Any CSS exception, possibly
      *            wrapping another exception.
      * @exception IOException An IO exception from the parser,
@@ -267,7 +267,7 @@
     }
 
     /**
-     * Parse a CSS priority value (e.g. "!important").
+     * Parse a CSS priority value (e&#x2e;g&#x2e; "&#x21;important").
      * 
      * 
      * @exception CSSException Any CSS exception, possibly
diff --git a/sources/org/apache/batik/css/parser/LexicalUnits.java b/sources/org/apache/batik/css/parser/LexicalUnits.java
index 517065a..2f9247d 100755
--- a/sources/org/apache/batik/css/parser/LexicalUnits.java
+++ b/sources/org/apache/batik/css/parser/LexicalUnits.java
@@ -71,7 +71,7 @@
     int SEMI_COLON = 8;
 
     /**
-     * Represents the '>' lexical unit.
+     * Represents the '&gt;' lexical unit.
      */
     int PRECEDE = 9;
 
@@ -131,17 +131,17 @@
     int IDENTIFIER = 20;
 
     /**
-     * Represents the '<!--' lexical unit.
+     * Represents the '&lt;&#x21;--' lexical unit.
      */
     int CDO = 21;
 
     /**
-     * Represents the '-->' lexical unit.
+     * Represents the '--&gt;' lexical unit.
      */
     int CDC = 22;
 
     /**
-     * Represents the '!important' lexical unit.
+     * Represents the '&#x21;important' lexical unit.
      */
     int IMPORTANT_SYMBOL = 23;
 
diff --git a/sources/org/apache/batik/css/parser/Parser.java b/sources/org/apache/batik/css/parser/Parser.java
index 444c67c..dd1c0c3 100644
--- a/sources/org/apache/batik/css/parser/Parser.java
+++ b/sources/org/apache/batik/css/parser/Parser.java
@@ -881,7 +881,7 @@
 
     /**
      * Parses a CSS2 expression.
-     * @param lex The type of the current lexical unit.
+     * @param param whether the expression to be parsed is a function parameter
      */
     protected LexicalUnit parseExpression(boolean param) {
         LexicalUnit result = parseTerm(null);
diff --git a/sources/org/apache/batik/css/parser/Scanner.java b/sources/org/apache/batik/css/parser/Scanner.java
index 960a2a2..c1a4931 100755
--- a/sources/org/apache/batik/css/parser/Scanner.java
+++ b/sources/org/apache/batik/css/parser/Scanner.java
@@ -104,7 +104,7 @@
 
     /**
      * Creates a new Scanner object.
-     * @param r The reader to scan.
+     * @param s The string to scan.
      */
     public Scanner(String s) throws ParseException {
         try {
@@ -421,9 +421,9 @@
                     start = position - 1;
                     do {
                         nextChar();
-                        if (current == '\\') {
+                        while (current == '\\') {
                             nextChar();
-                            escape();
+                           escape();
                         }
                     } while (current != -1 &&
                              ScannerUtilities.isCSSNameCharacter
@@ -514,7 +514,7 @@
                 }
                 do {
                     nextChar();
-                    if (current == '\\') {
+                    while (current == '\\') {
                         nextChar();
                         escape();
                     }
@@ -751,30 +751,34 @@
                 type = LexicalUnits.IDENTIFIER;
                 return;
             default:
-                if (ScannerUtilities.isCSSIdentifierStartCharacter
-                    ((char)current)) {
-                    // Identifier
+                if (current == '\\') {
                     do {
                         nextChar();
-                        if (current == '\\') {
-                            nextChar();
-                            escape();
-                        }
-                    } while (current != -1 && 
-                             ScannerUtilities.isCSSNameCharacter
-                             ((char)current));
-                    if (current == '(') {
+                        escape();
+                    } while(current == '\\');
+                } else if (!ScannerUtilities.isCSSIdentifierStartCharacter
+                           ((char)current)) {
+                    nextChar();
+                    throw new ParseException("identifier.character",
+                                             reader.getLine(),
+                                             reader.getColumn());
+                }
+                // Identifier
+                while ((current != -1) && 
+                       ScannerUtilities.isCSSNameCharacter((char)current)) {
+                    nextChar();
+                    while (current == '\\') {
                         nextChar();
-                        type = LexicalUnits.FUNCTION;
-                        return;
+                        escape();
                     }
-                    type = LexicalUnits.IDENTIFIER;
+                }
+                if (current == '(') {
+                    nextChar();
+                    type = LexicalUnits.FUNCTION;
                     return;
                 }
-                nextChar();
-                throw new ParseException("identifier.character",
-                                         reader.getLine(),
-                                         reader.getColumn());
+                type = LexicalUnits.IDENTIFIER;
+                return;
             }
         } catch (IOException e) {
             throw new ParseException(e);
diff --git a/sources/org/apache/batik/css/parser/ScannerUtilities.java b/sources/org/apache/batik/css/parser/ScannerUtilities.java
index 179d422..1d464bf 100755
--- a/sources/org/apache/batik/css/parser/ScannerUtilities.java
+++ b/sources/org/apache/batik/css/parser/ScannerUtilities.java
@@ -29,27 +29,32 @@
     /**
      * The set of the valid identifier start characters.
      */
-    protected final static int[] IDENTIFIER_START = { 0, 0, 134217726, 134217726 };
+    protected final static int[] IDENTIFIER_START = 
+    { 0x0, 0x0, 0x87FFFFFE, 0x7FFFFFE };
 
     /**
      * The set of the valid name characters.
      */
-    protected final static int[] NAME = { 0, 67051520, 134217726, 134217726 };
+    protected final static int[] NAME = 
+    { 0, 0x3FF2000, 0x87FFFFFE, 0x7FFFFFE };
 
     /**
      * The set of the valid hexadecimal characters.
      */
-    protected final static int[] HEXADECIMAL = { 0, 67043328, 126, 126 };
+    protected final static int[] HEXADECIMAL = 
+    { 0, 0x3FF0000, 0x7E, 0x7E };
 
     /**
      * The set of the valid string characters.
      */
-    protected final static int[] STRING = { 512, -133, -1, 2147483647 };
+    protected final static int[] STRING = 
+    { 0x200, 0xFFFFFF7B, 0xFFFFFFFF, 0x7FFFFFFF };
 
     /**
      * The set of the valid uri characters.
      */
-    protected final static int[] URI = { 0, -902, -1, 2147483647 };
+    protected final static int[] URI = 
+    { 0x0, 0xFFFFFC7A, 0xFFFFFFFF, 0x7FFFFFFF };
 
     /**
      * This class does not need to be instantiated.
@@ -73,34 +78,34 @@
      * Tests whether the given character is a valid identifier start character.
      */
     public static boolean isCSSIdentifierStartCharacter(char c) {
-	return c >= 128 || ((IDENTIFIER_START[c / 32] & (1 << (c % 32))) != 0);
+	return c >= 128 || ((IDENTIFIER_START[c>>5] & (1 << (c &0x1F))) != 0);
     }
 
     /**
      * Tests whether the given character is a valid name character.
      */
     public static boolean isCSSNameCharacter(char c) {
-	return c >= 128 || ((NAME[c / 32] & (1 << (c % 32))) != 0);
+	return c >= 128 || ((NAME[c >>5] & (1 << (c &0x1F))) != 0);
     }
 
     /**
      * Tests whether the given character is a valid hexadecimal character.
      */
     public static boolean isCSSHexadecimalCharacter(char c) {
-	return c < 128 && ((HEXADECIMAL[c / 32] & (1 << (c % 32))) != 0);
+	return c < 128 && ((HEXADECIMAL[c>>5] & (1 << (c&0x1F))) != 0);
     }
 
     /**
      * Tests whether the given character is a valid string character.
      */
     public static boolean isCSSStringCharacter(char c) {
-	return c >= 128 || ((STRING[c / 32] & (1 << (c % 32))) != 0);
+	return c >= 128 || ((STRING[c>>5] & (1 << (c&0x1F))) != 0);
     }
 
     /**
      * Tests whether the given character is a valid URI character.
      */
     public static boolean isCSSURICharacter(char c) {
-	return c >= 128 || ((URI[c / 32] & (1 << (c % 32))) != 0);
+	return c >= 128 || ((URI[c>>5] & (1 << (c&0x1F))) != 0);
     }
 }
diff --git a/sources/org/apache/batik/dom/AbstractAttr.java b/sources/org/apache/batik/dom/AbstractAttr.java
index 49d066d..97f6480 100644
--- a/sources/org/apache/batik/dom/AbstractAttr.java
+++ b/sources/org/apache/batik/dom/AbstractAttr.java
@@ -44,6 +44,11 @@
     protected boolean unspecified;
 
     /**
+     * Whether this attribute is an ID attribute
+     */
+    protected boolean isIdAttr;
+
+    /**
      * The owner element.
      */
     protected AbstractElement ownerElement;
@@ -54,11 +59,6 @@
     protected TypeInfo typeInfo;
 
     /**
-     * Whether this attribute node is an ID.
-     */
-    protected boolean isIdAttribute;
-
-    /**
      * Creates a new Attr object.
      */
     protected AbstractAttr() {
@@ -86,6 +86,7 @@
      */
     public void setNodeName(String v) {
 	nodeName = v;
+        isIdAttr = ownerDocument.isId(this);
     }
 
     /**
@@ -225,7 +226,14 @@
      * <b>DOM</b>: Implements {@link org.w3c.dom.Attr#getIsId()}.
      */
     public boolean isId() {
-        return isIdAttribute || nodeName.equals("id");
+        return isIdAttr;
+    }
+
+    /**
+     * Sets whether this attribute is an ID attribute.
+     */
+    public void setIsId(boolean isId) {
+        isIdAttr = isId;
     }
 
     /**
@@ -248,8 +256,9 @@
     protected Node export(Node n, AbstractDocument d) {
 	super.export(n, d);
 	AbstractAttr aa = (AbstractAttr)n;
-	aa.nodeName = nodeName;
-	aa.unspecified = false;
+	aa.nodeName     = nodeName;
+	aa.unspecified  = false;
+        aa.isIdAttr     = d.isId(aa);
 	return n;
     }
 
@@ -259,8 +268,9 @@
     protected Node deepExport(Node n, AbstractDocument d) {
 	super.deepExport(n, d);
 	AbstractAttr aa = (AbstractAttr)n;
-	aa.nodeName = nodeName;
-	aa.unspecified = false;
+	aa.nodeName     = nodeName;
+	aa.unspecified  = false;
+        aa.isIdAttr     = d.isId(aa);
 	return n;
     }
 
@@ -271,8 +281,9 @@
     protected Node copyInto(Node n) {
 	super.copyInto(n);
 	AbstractAttr aa = (AbstractAttr)n;
-	aa.nodeName = nodeName;
-	aa.unspecified = unspecified;
+	aa.nodeName     = nodeName;
+	aa.unspecified  = unspecified;
+        aa.isIdAttr     = isIdAttr;
 	return n;
     }
 
@@ -283,8 +294,9 @@
     protected Node deepCopyInto(Node n) {
 	super.deepCopyInto(n);
 	AbstractAttr aa = (AbstractAttr)n;
-	aa.nodeName = nodeName;
-	aa.unspecified = unspecified;
+	aa.nodeName     = nodeName;
+	aa.unspecified  = unspecified;
+        aa.isIdAttr     = isIdAttr;
 	return n;
     }
 
diff --git a/sources/org/apache/batik/dom/AbstractDocument.java b/sources/org/apache/batik/dom/AbstractDocument.java
index 7e09c74..a521e26 100644
--- a/sources/org/apache/batik/dom/AbstractDocument.java
+++ b/sources/org/apache/batik/dom/AbstractDocument.java
@@ -21,10 +21,13 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.lang.reflect.Method;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.MissingResourceException;
 import java.util.WeakHashMap;
 
@@ -34,6 +37,7 @@
 import org.apache.batik.dom.util.DOMUtilities;
 import org.apache.batik.i18n.Localizable;
 import org.apache.batik.i18n.LocalizableSupport;
+import org.apache.batik.util.CleanerThread;
 import org.apache.batik.util.DOMConstants;
 import org.apache.batik.util.SoftDoublyIndexedTable;
 import org.apache.batik.util.XMLConstants;
@@ -164,6 +168,15 @@
     protected DocumentConfiguration domConfig;
 
     /**
+     * The elementsById lists.
+     * This is keyed on 'id'.  the entry is either
+     * a IdSoftReference to the element or a List of
+     * IdSoftReferences (if there is more than one element
+     * owned by this document with a particular 'id').
+     */
+    protected transient Map elementsById;
+
+    /**
      * Creates a new document.
      */
     protected AbstractDocument() {
@@ -301,19 +314,21 @@
      */
     public Node importNode(Node importedNode, boolean deep)
         throws DOMException {
-        /* TED: This is bad because it usually does not create the
-         * the proper subclass of Element for the document it is
-         * being imported into based on namespace/tag name.
-         */
-        /**
-        if (importedNode instanceof AbstractNode) {
-            AbstractNode an = (AbstractNode)importedNode;
-            return (deep)
-                ? an.deepExport(an.cloneNode(false), this)
-                : an.export(an.cloneNode(false), this);
-        }
-        */
+        return importNode(importedNode, deep, false);
+    }
 
+    /**
+     * Imports the given node 'importNode' to this document.
+     * It does so deeply if 'deep' is set to true.
+     * It will not mark id attributes as id's if 'trimId' is set false.
+     * this is used primarily for the clone trees of the 'use' element
+     * so they don't clutter the hashtable.
+     */
+    public Node importNode(Node importedNode, boolean deep, boolean trimId) {
+        /*
+         * The trimming of id's is used by the 'use' element to keep 
+         * down the amount of 'bogus' id's in the hashtable.
+         */
         Node result;
         switch (importedNode.getNodeType()) {
         case ELEMENT_NODE:
@@ -325,9 +340,11 @@
                 int len = attr.getLength();
                 for (int i = 0; i < len; i++) {
                     Attr a = (Attr)attr.item(i);
-                    if (a.getSpecified()) {
-                        e.setAttributeNodeNS((Attr)importNode(a, true));
-                    }
+                    if (!a.getSpecified()) continue;
+                    AbstractAttr aa = (AbstractAttr)importNode(a, true);
+                    if (trimId && aa.isId())
+                        aa.setIsId(false); // don't consider this an Id.
+                    e.setAttributeNodeNS(aa);
                 }
             }
             break;
@@ -405,6 +422,185 @@
     }
 
     /**
+     * Returns whether the given attribute node is an ID attribute.
+     */
+    public abstract boolean isId(Attr node);
+
+    /**
+     * <b>DOM</b>: Implements {@link
+     * org.w3c.dom.Document#getElementById(String)}.
+     */
+    public Element getElementById(String id) {
+        return getChildElementById(getDocumentElement(), id);
+    }
+
+    /**
+     * Finds an element that is in the same document fragment as
+     * 'requestor' that has 'id'.
+     */
+    public Element getChildElementById(Node requestor, String id) {
+        if ((id == null) || (id.length()==0)) return null;
+        if (elementsById == null) return null;
+
+        Node root = getRoot(requestor);
+
+        Object o = elementsById.get(id);
+        if (o == null) return null;
+        if (o instanceof IdSoftRef) {
+            o = ((IdSoftRef)o).get();
+            if (o == null) {
+                elementsById.remove(id);
+                return null;
+            }
+            Element e = (Element)o;
+            if (getRoot(e) == root)
+                return e;
+            return null;
+        }
+        
+        // Not a IdSoftRef so it must be a list.
+        List l = (List)o;
+        Iterator li = l.iterator();
+        while (li.hasNext()) {
+            IdSoftRef sr = (IdSoftRef)li.next();
+            o = sr.get();
+            if (o == null) {
+                li.remove();
+            } else {
+                Element e = (Element)o;
+                if (getRoot(e) == root)
+                    return e;
+            }
+        }
+        return null;
+    }
+
+    protected Node getRoot(Node n) {
+        Node r = n;
+        while (n != null) {
+            r = n;
+            n = n.getParentNode();
+        }
+        return r;
+    }
+
+    protected class IdSoftRef extends CleanerThread.SoftReferenceCleared {
+        String id;
+        List   list;
+        IdSoftRef(Object o, String id) { 
+            super(o);
+            this.id = id; 
+        }
+        IdSoftRef(Object o, String id, List list) {
+            super(o);
+            this.id = id;
+            this.list = list;
+        }
+        public void setList(List list) {
+            this.list = list;
+        }
+        public void cleared() {
+            if (elementsById == null) return;
+            synchronized (elementsById) {
+                if (list != null) 
+                    list.remove(this);
+                else {
+                  Object o = elementsById.remove(id);
+                  if (o != this) // oops not us!
+                      elementsById.put(id, o);
+                }
+            }
+        }
+    }
+
+    /**
+     * Remove the mapping for <tt>element</tt> to <tt>id</tt>
+     */
+    public void removeIdEntry(Element e, String id) {
+        // Remove old Id mapping if we have one.
+        if (id == null) return;
+        if (elementsById == null) return;
+
+        synchronized (elementsById) {
+            Object o = elementsById.get(id);
+            if (o == null) return;
+
+            if (o instanceof IdSoftRef) {
+                elementsById.remove(id);
+                return;
+            } 
+            
+            List l = (List)o;
+            Iterator li = l.iterator();
+            while (li.hasNext()) {
+                IdSoftRef ip = (IdSoftRef)li.next();
+                o = ip.get();
+                if (o == null) {
+                    li.remove();
+                } else if (e == o) {
+                    li.remove();
+                    break;
+                }
+            }
+            
+            if (l.size() == 0)
+                elementsById.remove(id);
+        }
+    }
+
+    public void addIdEntry(Element e, String id) {
+        if (id == null) return;
+
+        if (elementsById == null) {
+            Map tmp = new HashMap();
+            synchronized (tmp) {
+                elementsById = tmp;
+                elementsById.put(id, new IdSoftRef(e, id));
+            }
+            return;
+        }
+
+        synchronized (elementsById) {
+            // Add new Id mapping.
+            Object o = elementsById.get(id);
+            if (o == null) {
+                elementsById.put(id, new IdSoftRef(e, id));
+                return;
+            }
+            if (o instanceof IdSoftRef) {
+                IdSoftRef ip = (IdSoftRef)o;
+                Object r = ip.get();
+                if (r == null) { // reference is gone so replace it.
+                    elementsById.put(id, new IdSoftRef(e, id));
+                    return;
+                }
+                
+                // Create new List for this id.
+                List l = new ArrayList(4);
+                ip.setList(l);
+                l.add(ip);
+                l.add(new IdSoftRef(e, id, l));
+                elementsById.put(id, l);
+                return;
+            }
+            
+            List l = (List)o;
+            l.add(new IdSoftRef(e, id, l));
+        }
+    }
+
+    public void updateIdEntry(Element e, String oldId, String newId) {
+        if ((oldId == newId) || 
+            ((oldId != null) && (oldId.equals(newId)))) 
+            return;
+
+        removeIdEntry(e, oldId);
+
+        addIdEntry(e, newId);
+    }
+
+
+    /**
      * Returns an ElementsByTagName object from the cache, if any.
      */
     public ElementsByTagName getElementsByTagName(Node n, String ln) {
@@ -591,6 +787,13 @@
 	ad.implementation = implementation;
         ad.localizableSupport = new LocalizableSupport
             (RESOURCES, getClass().getClassLoader());
+        ad.inputEncoding = inputEncoding;
+        ad.xmlEncoding = xmlEncoding;
+        ad.xmlVersion = xmlVersion;
+        ad.xmlStandalone = xmlStandalone;
+        ad.documentURI = documentURI;
+        ad.strictErrorChecking = strictErrorChecking;
+        // XXX clone DocumentConfiguration?
 	return n;
     }
 
@@ -725,41 +928,6 @@
     }
 
     /**
-     * <b>DOM</b>: Implements {@link Document#getElementById(String)}.
-     */
-    public Element getElementById(String elementId) {
-        if (elementId == null || elementId.equals("")) {
-            return null;
-        }
-        Element e = getDocumentElement();
-        if (e == null) {
-            return null;
-        }
-        return getById(elementId, e);
-    }
-
-    /**
-     * An auxiliary method used by getElementById.
-     */
-    protected static Element getById(String id, Node node) {
-        if (node.getNodeType() == Node.ELEMENT_NODE) {
-            AbstractElement elt = (AbstractElement) node;
-            if (id.equals(elt.getId())) {
-                return elt;
-            }
-        }
-        for (Node n = node.getFirstChild();
-             n != null;
-             n = n.getNextSibling()) {
-            Element result = getById(id, n);
-            if (result != null) {
-                return result;
-            }
-        }
-        return null;
-    }
-
-    /**
      * <b>DOM</b>: Implements {@link org.w3c.dom.Document#adoptNode(Node)}.
      */
     public Node adoptNode(Node n) throws DOMException {
diff --git a/sources/org/apache/batik/dom/AbstractElement.java b/sources/org/apache/batik/dom/AbstractElement.java
index 173bc77..9f000fd 100644
--- a/sources/org/apache/batik/dom/AbstractElement.java
+++ b/sources/org/apache/batik/dom/AbstractElement.java
@@ -314,7 +314,7 @@
                                      "readonly.node",
                                      new Object[] { name });
         }
-        a.isIdAttribute = isId;
+        a.isIdAttr = isId;
     }
 
     /**
@@ -334,7 +334,7 @@
                                      "readonly.node",
                                      new Object[] { a.getNodeName() });
         }
-        a.isIdAttribute = isId;
+        a.isIdAttr = isId;
     }
 
     /**
@@ -349,7 +349,7 @@
                                      "readonly.node",
                                      new Object[] { a.getNodeName() });
         }
-        a.isIdAttribute = isId;
+        a.isIdAttr = isId;
     }
 
     /**
@@ -578,8 +578,8 @@
 
     /**
      * Fires a DOMAttrModified event.
-     * <!> WARNING: public accessor because of compilation problems
-     *     on Solaris. Do not change.
+     * WARNING: public accessor because of compilation problems
+     * on Solaris. Do not change.
      *
      * @param name The attribute's name.
      * @param node The attribute's node.
@@ -591,14 +591,20 @@
                                          String newv, short change) {
         switch (change) {
         case MutationEvent.ADDITION:
+            if (((AbstractAttr)node).isId()) 
+                ownerDocument.addIdEntry(this, newv);
             attrAdded(node, newv);
             break;
 
         case MutationEvent.MODIFICATION:
+            if (((AbstractAttr)node).isId()) 
+                ownerDocument.updateIdEntry(this, oldv, newv);
             attrModified(node, oldv, newv);
             break;
 
         default: // MutationEvent.REMOVAL:
+            if (((AbstractAttr)node).isId()) 
+                ownerDocument.removeIdEntry(this, oldv);
             attrRemoved(node, oldv);
         }
 	AbstractDocument doc = getCurrentDocument();
diff --git a/sources/org/apache/batik/dom/AbstractNode.java b/sources/org/apache/batik/dom/AbstractNode.java
index 84877b3..40a4886 100644
--- a/sources/org/apache/batik/dom/AbstractNode.java
+++ b/sources/org/apache/batik/dom/AbstractNode.java
@@ -905,7 +905,7 @@
     /**
      * <b>DOM</b>: Implements
      * {@link
-     * EventTarget#addEventListener(String,EventListener,boolean)}.
+     * org.w3c.dom.events.EventTarget#addEventListener(String,EventListener,boolean)}.
      */
     public void addEventListener(String type,
                                  EventListener listener,
@@ -943,7 +943,7 @@
     /**
      * <b>DOM</b>: Implements
      * {@link
-     * EventTarget#removeEventListener(String,EventListener,boolean)}.
+     * org.w3c.dom.events.EventTarget#removeEventListener(String,EventListener,boolean)}.
      */
     public void removeEventListener(String type,
                                     EventListener listener,
diff --git a/sources/org/apache/batik/dom/AbstractParentNode.java b/sources/org/apache/batik/dom/AbstractParentNode.java
index 1916f15..75960f5 100644
--- a/sources/org/apache/batik/dom/AbstractParentNode.java
+++ b/sources/org/apache/batik/dom/AbstractParentNode.java
@@ -457,7 +457,11 @@
 				     "node.from.wrong.document",
 				     new Object[] { new Integer(getNodeType()),
 						    getNodeName() });
-        
+        if (this == n)
+            throw createDOMException
+                (DOMException.HIERARCHY_REQUEST_ERR,
+                 "add.self", new Object[] { getNodeName() });
+
 	Node np = n.getParentNode();
         if (np == null)
             return;  // Already removed from tree, do nothing.
diff --git a/sources/org/apache/batik/dom/AbstractProcessingInstruction.java b/sources/org/apache/batik/dom/AbstractProcessingInstruction.java
index 0f8e7d9..c9021e6 100644
--- a/sources/org/apache/batik/dom/AbstractProcessingInstruction.java
+++ b/sources/org/apache/batik/dom/AbstractProcessingInstruction.java
@@ -63,7 +63,6 @@
 
     /**
      * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setNodeValue(String)}.
-     * @return {@link #setData(String)}.
      */
     public void setNodeValue(String nodeValue) throws DOMException {
 	setData(nodeValue);
diff --git a/sources/org/apache/batik/dom/AbstractStylableDocument.java b/sources/org/apache/batik/dom/AbstractStylableDocument.java
index bac0959..cf0b0cc 100644
--- a/sources/org/apache/batik/dom/AbstractStylableDocument.java
+++ b/sources/org/apache/batik/dom/AbstractStylableDocument.java
@@ -32,7 +32,7 @@
 /**
  * A Document that supports CSS styling.
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public abstract class AbstractStylableDocument extends AbstractDocument
diff --git a/sources/org/apache/batik/dom/GenericDocument.java b/sources/org/apache/batik/dom/GenericDocument.java
index 6bc8fa2..a3fc77e 100644
--- a/sources/org/apache/batik/dom/GenericDocument.java
+++ b/sources/org/apache/batik/dom/GenericDocument.java
@@ -39,6 +39,10 @@
  */
 public class GenericDocument
     extends AbstractDocument {
+
+    /** Local name for 'id' attributes. */
+    protected final static String ATTR_ID = "id";
+
     /**
      * Is this document immutable?
      */
@@ -72,6 +76,15 @@
     }
 
     /**
+     * Returns true if the given Attr node represents an 'id' 
+     * for this document.
+     */
+    public boolean isId(Attr node) {
+        if (node.getNamespaceURI() != null) return false;
+        return ATTR_ID.equals(node.getNodeName());
+    }
+
+    /**
      * <b>DOM</b>: Implements {@link
      * org.w3c.dom.Document#createElement(String)}.
      */
diff --git a/sources/org/apache/batik/dom/GenericDocumentType.java b/sources/org/apache/batik/dom/GenericDocumentType.java
index 3a8b4dd..2790845 100644
--- a/sources/org/apache/batik/dom/GenericDocumentType.java
+++ b/sources/org/apache/batik/dom/GenericDocumentType.java
@@ -25,7 +25,7 @@
 /**
  * This class implements the {@link org.w3c.dom.DocumentType} interface.
  *
- * @version $Id:$
+ * @version $Id$
  */
 public class GenericDocumentType
         extends AbstractChildNode 
diff --git a/sources/org/apache/batik/dom/events/DOMKeyEvent.java b/sources/org/apache/batik/dom/events/DOMKeyEvent.java
index d70d3de..b7d75a9 100644
--- a/sources/org/apache/batik/dom/events/DOMKeyEvent.java
+++ b/sources/org/apache/batik/dom/events/DOMKeyEvent.java
@@ -221,59 +221,57 @@
     protected int charCode;
 
     /**
-     *  <code>ctrlKey</code> indicates whether the 'ctrl' key was
-     *  depressed * during the firing of the event.
+     * Returns whether the 'ctrl' key was depressed during the firing of the
+     * event.
      */
     public boolean getCtrlKey() {
         return ctrlKey;
     }
 
     /**
-     *  <code>shiftKey</code> indicates whether the 'shift' key was
-     *  depressed * during the firing of the event.
+     * Returns whether the 'shift' key was depressed during the firing of the
+     * event.
      */
     public boolean getShiftKey() {
         return shiftKey;
     }
 
     /**
-     *  <code>altKey</code> indicates whether the 'alt' key was
-     *  depressed during * the firing of the event.  On some platforms
-     *  this key may map to an * alternative key name.
+     * Returns whether the 'alt' key was depressed during the firing of the
+     * event.  On some platforms this key may map to an alternative key name.
      */
     public boolean getAltKey() {
         return altKey;
     }
 
     /**
-     *  <code>metaKey</code> indicates whether the 'meta' key was
-     *  depressed * during the firing of the event.  On some platforms
-     *  this key may map to * an alternative key name.
+     * Returns whether the 'meta' key was depressed during the firing of
+     * the event.  On some platforms this key may map to an alternative
+     * key name.
      */
     public boolean getMetaKey() {
         return metaKey;
     }
 
     /**
-     *  The value of <code>keyCode</code> holds the virtual key code
-     *  value of * the key which was depressed if the event is a key
-     *  event.  Otherwise, the * value is zero.
+     * Returns the virtual key code value of the key which was depressed
+     * if the event is a key event.  Otherwise, the value returned is zero.
      */
     public int getKeyCode() {
         return keyCode;
     }
 
     /**
-     *  <code>charCode</code> holds the value of the Unicode character
-     *  * associated with the depressed key if the event is a key
-     *  event.  * Otherwise, the value is zero.
+     * Returns the value of the Unicode character associated with the
+     * depressed key if the event is a key event.  Otherwise, the value
+     * returned is zero.
      */
     public int getCharCode() {
         return charCode;
     }
 
     /**
-     * 
+     * Initializes this KeyEvent.
      * @param typeArg Specifies the event type.
      * @param canBubbleArg Specifies whether or not the event can bubble.
      * @param cancelableArg Specifies whether or not the event's default  action 
diff --git a/sources/org/apache/batik/dom/events/EventSupport.java b/sources/org/apache/batik/dom/events/EventSupport.java
index f17f45b..9dc2c15 100644
--- a/sources/org/apache/batik/dom/events/EventSupport.java
+++ b/sources/org/apache/batik/dom/events/EventSupport.java
@@ -206,7 +206,7 @@
      * <code>dispatchEvent</code> is called.
      *
      * @param target the target node
-     * @param evt Specifies the event type, behavior, and contextual
+     * @param e Specifies the event type, behavior, and contextual
      * information to be used in processing the event.
      *
      * @return The return value of <code>dispatchEvent</code>
diff --git a/sources/org/apache/batik/dom/svg/AbstractSVGLength.java b/sources/org/apache/batik/dom/svg/AbstractSVGLength.java
index bb7e2f3..1b75be1 100644
--- a/sources/org/apache/batik/dom/svg/AbstractSVGLength.java
+++ b/sources/org/apache/batik/dom/svg/AbstractSVGLength.java
@@ -28,7 +28,7 @@
  * Default implementation for SVGLength.
  *
  * This implementation provides the basic
- * functionnalities of SVGLength. To have 
+ * functionalities of SVGLength. To have 
  * a complete implementation, an element is
  * required to resolve the units.
  *
@@ -256,7 +256,6 @@
          */
         public float getPixelToMM() {
             return getPixelUnitToMillimeter();
-            
         }
         
         /**
diff --git a/sources/org/apache/batik/dom/svg/AbstractSVGList.java b/sources/org/apache/batik/dom/svg/AbstractSVGList.java
index 0a05471..9654f82 100644
--- a/sources/org/apache/batik/dom/svg/AbstractSVGList.java
+++ b/sources/org/apache/batik/dom/svg/AbstractSVGList.java
@@ -127,10 +127,7 @@
                                                        Object[] args);
 
     /**
-     * Creates a new SVGList.
-     * @param elt The associated element.
-     * @param ns The attribute's namespace URI.
-     * @param ln The attribute's local name.
+     * Creates a new AbstractSVGList.
      */
     protected AbstractSVGList() {
     }
diff --git a/sources/org/apache/batik/dom/svg/AbstractSVGNumberList.java b/sources/org/apache/batik/dom/svg/AbstractSVGNumberList.java
index 33f30c2..920f8fd 100644
--- a/sources/org/apache/batik/dom/svg/AbstractSVGNumberList.java
+++ b/sources/org/apache/batik/dom/svg/AbstractSVGNumberList.java
@@ -240,21 +240,21 @@
             listHandler.startList();
         }
         /**
-         * Implements {@link org.apache.batik.parser.NumberHandler#startNumber()}.
+         * Implements {@link org.apache.batik.parser.NumberListHandler#startNumber()}.
          */
         public void startNumber() throws ParseException {
             currentValue = 0.0f;
         }
 
         /**
-         * Implements {@link org.apache.batik.parser.NumberHandler#numberValue(float)}.
+         * Implements {@link org.apache.batik.parser.NumberListHandler#numberValue(float)}.
          */
         public void numberValue(float v) throws ParseException {
             currentValue = v;
         }
         
         /**
-         * Implements {@link org.apache.batik.parser.NumberHandler#endNumber()}.
+         * Implements {@link org.apache.batik.parser.NumberListHandler#endNumber()}.
          */
         public void endNumber() throws ParseException {
             listHandler.item(new SVGNumberItem(currentValue));
diff --git a/sources/org/apache/batik/dom/svg/SAXSVGDocumentFactory.java b/sources/org/apache/batik/dom/svg/SAXSVGDocumentFactory.java
index b86ebe9..8e9a818 100755
--- a/sources/org/apache/batik/dom/svg/SAXSVGDocumentFactory.java
+++ b/sources/org/apache/batik/dom/svg/SAXSVGDocumentFactory.java
@@ -147,7 +147,7 @@
     }
 
     /**
-     * Creates a SVG Document instance.<br>
+     * Creates a SVG Document instance.
      * This method supports gzipped sources.
      * @param uri The document URI.
      * @exception IOException if an error occured while reading the document.
diff --git a/sources/org/apache/batik/dom/svg/SVGDOMImplementation.java b/sources/org/apache/batik/dom/svg/SVGDOMImplementation.java
index 4b36666..b7fd0ca 100644
--- a/sources/org/apache/batik/dom/svg/SVGDOMImplementation.java
+++ b/sources/org/apache/batik/dom/svg/SVGDOMImplementation.java
@@ -52,6 +52,7 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.css.CSSStyleDeclaration;
 import org.w3c.dom.css.CSSStyleSheet;
+import org.w3c.dom.css.DOMImplementationCSS;
 import org.w3c.dom.css.ViewCSS;
 import org.w3c.dom.events.Event;
 import org.w3c.dom.stylesheets.StyleSheet;
diff --git a/sources/org/apache/batik/dom/svg/SVGLocatableSupport.java b/sources/org/apache/batik/dom/svg/SVGLocatableSupport.java
index 5712957..e4fba11 100644
--- a/sources/org/apache/batik/dom/svg/SVGLocatableSupport.java
+++ b/sources/org/apache/batik/dom/svg/SVGLocatableSupport.java
@@ -66,8 +66,7 @@
     }
 
     /**
-     * To implement {@link
-     * org.w3c.dom.svg.SVGLocatable#getBBox()}.
+     * To implement {@link org.w3c.dom.svg.SVGLocatable#getBBox()}.
      */
     public static SVGRect getBBox(Element elt) {
         final SVGOMElement svgelt = (SVGOMElement)elt;
@@ -112,8 +111,7 @@
     }
 
     /**
-     * To implement {@link
-     * org.w3c.dom.svg.SVGLocatable#getCTM()}.
+     * To implement {@link org.w3c.dom.svg.SVGLocatable#getCTM()}.
      */
     public static SVGMatrix getCTM(Element elt) {
         final SVGOMElement svgelt = (SVGOMElement)elt;
@@ -125,8 +123,7 @@
     }
 
     /**
-     * To implement {@link
-     * org.w3c.dom.svg.SVGLocatable#getScreenCTM()}.
+     * To implement {@link org.w3c.dom.svg.SVGLocatable#getScreenCTM()}.
      */
     public static SVGMatrix getScreenCTM(Element elt) {
         final SVGOMElement svgelt  = (SVGOMElement)elt;
diff --git a/sources/org/apache/batik/dom/svg/SVGOMAnimatedLength.java b/sources/org/apache/batik/dom/svg/SVGOMAnimatedLength.java
index 9988a85..78336e1 100644
--- a/sources/org/apache/batik/dom/svg/SVGOMAnimatedLength.java
+++ b/sources/org/apache/batik/dom/svg/SVGOMAnimatedLength.java
@@ -17,10 +17,9 @@
  */
 package org.apache.batik.dom.svg;
 
-
 /**
  * This class provides an implementation of the {@link
- * SVGAnimatedLength} interface.
+ * org.w3c.dom.svg.SVGAnimatedLength} interface.
  *
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  * @version $Id$
diff --git a/sources/org/apache/batik/dom/svg/SVGOMAnimatedPreserveAspectRatio.java b/sources/org/apache/batik/dom/svg/SVGOMAnimatedPreserveAspectRatio.java
index 4856fff..7a304b6 100644
--- a/sources/org/apache/batik/dom/svg/SVGOMAnimatedPreserveAspectRatio.java
+++ b/sources/org/apache/batik/dom/svg/SVGOMAnimatedPreserveAspectRatio.java
@@ -26,9 +26,10 @@
 import org.w3c.dom.svg.SVGException;
 
 /**
- * This class implements the {@link SVGAnimatePreserveAspectRatio} interface.
+ * This class implements the {@link SVGAnimatedPreserveAspectRatio} interface.
  *
  * @author  Tonny Kohar
+ * @version $Id$
  */
 public class SVGOMAnimatedPreserveAspectRatio 
     implements SVGAnimatedPreserveAspectRatio, LiveAttributeValue {
diff --git a/sources/org/apache/batik/dom/svg/SVGOMDocument.java b/sources/org/apache/batik/dom/svg/SVGOMDocument.java
index 49677e2..f668d49 100644
--- a/sources/org/apache/batik/dom/svg/SVGOMDocument.java
+++ b/sources/org/apache/batik/dom/svg/SVGOMDocument.java
@@ -37,6 +37,7 @@
 import org.apache.batik.dom.GenericText;
 import org.apache.batik.dom.StyleSheetFactory;
 import org.apache.batik.dom.util.XMLSupport;
+import org.apache.batik.i18n.Localizable;
 import org.apache.batik.i18n.LocalizableSupport;
 import org.apache.batik.util.SVGConstants;
 
@@ -45,6 +46,7 @@
 import org.w3c.dom.Comment;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
 import org.w3c.dom.DocumentFragment;
 import org.w3c.dom.DocumentType;
 import org.w3c.dom.Element;
@@ -316,6 +318,15 @@
         isSVG12 = b;
     }
 
+    /**
+     * Returns true if the given Attr node represents an 'id' 
+     * for this document.
+     */
+    public boolean isId(Attr node) {
+        if (node.getNamespaceURI() != null) return false;
+        return SVG_ID_ATTRIBUTE.equals(node.getNodeName());
+    }
+
     // AbstractDocument ///////////////////////////////////////////////
 
     /**
diff --git a/sources/org/apache/batik/dom/svg/SVGOMMatrix.java b/sources/org/apache/batik/dom/svg/SVGOMMatrix.java
index 765f011..1b088b6 100644
--- a/sources/org/apache/batik/dom/svg/SVGOMMatrix.java
+++ b/sources/org/apache/batik/dom/svg/SVGOMMatrix.java
@@ -20,8 +20,8 @@
 import java.awt.geom.AffineTransform;
 
 /**
- * This class provides an implementation of the {@link SVGMatrix}
- * interface.
+ * This class provides an implementation of the {@link
+ * org.w3c.dom.svg.SVGMatrix} interface.
  *
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  * @version $Id$
diff --git a/sources/org/apache/batik/dom/svg/SVGOMPathElement.java b/sources/org/apache/batik/dom/svg/SVGOMPathElement.java
index b3a4d57..a255ae8 100644
--- a/sources/org/apache/batik/dom/svg/SVGOMPathElement.java
+++ b/sources/org/apache/batik/dom/svg/SVGOMPathElement.java
@@ -81,35 +81,35 @@
      * <b>DOM</b>: Implements {@link SVGPathElement#getPathLength()}.
      */
     public SVGAnimatedNumber getPathLength() {
-        throw new RuntimeException(" !!! getPathLength()");
+        throw new RuntimeException(" !!! getPathLength() Not Yet Implemented");
     }
 
     /**
      * <b>DOM</b>: Implements {@link SVGPathElement#getTotalLength()}.
      */
     public float getTotalLength() {
-        throw new RuntimeException(" !!! getTotalLength()");
+        return SVGPathSupport.getTotalLength(this);
     }
 
     /**
      * <b>DOM</b>: Implements {@link SVGPathElement#getPointAtLength(float)}.
      */
     public SVGPoint getPointAtLength(float distance) {
-        throw new RuntimeException(" !!! getPointAtLength()");
+        return SVGPathSupport.getPointAtLength(this, distance);
     }
 
     /**
      * <b>DOM</b>: Implements {@link SVGPathElement#getPathSegAtLength(float)}.
      */
     public int getPathSegAtLength(float distance) {
-        throw new RuntimeException(" !!! getPathSegAtLength()");
+        throw new RuntimeException
+            (" !!! getPathSegAtLength() Not Yet Implemented");
     }
 
     /**
      * <b>DOM</b>: Implements {@link SVGPathElement#getPathSegList()}.
      */
     public SVGPathSegList getPathSegList() {
-        //throw new RuntimeException(" !!! getPathSegList()");
         return SVGAnimatedPathDataSupport.getPathSegList(this);
     }
 
@@ -117,7 +117,6 @@
      * <b>DOM</b>: Implements {@link SVGPathElement#getNormalizedPathSegList()}.
      */
     public SVGPathSegList getNormalizedPathSegList() {
-        //throw new RuntimeException(" !!! getNormalizedPathSegList()");
         return SVGAnimatedPathDataSupport.getNormalizedPathSegList(this);
     }
 
@@ -125,7 +124,6 @@
      * <b>DOM</b>: Implements {@link SVGPathElement#getAnimatedPathSegList()}.
      */
     public SVGPathSegList getAnimatedPathSegList() {
-        //throw new RuntimeException(" !!! getAnimatedPathSegList()");
         return SVGAnimatedPathDataSupport.getAnimatedNormalizedPathSegList(this);
     }
 
@@ -133,8 +131,8 @@
      * <b>DOM</b>: Implements {@link SVGPathElement#getAnimatedNormalizedPathSegList()}.
      */
     public SVGPathSegList getAnimatedNormalizedPathSegList() {
-        //throw new RuntimeException(" !!! getAnimatedNormalizedPathSegList()");
-        return SVGAnimatedPathDataSupport.getAnimatedNormalizedPathSegList(this);
+        return SVGAnimatedPathDataSupport.getAnimatedNormalizedPathSegList
+            (this);
     }
 
     // Factory methods /////////////////////////////////////////////////////
@@ -143,7 +141,6 @@
      * <b>DOM</b>: Implements {@link SVGPathElement#createSVGPathSegClosePath()}.
      */
     public SVGPathSegClosePath createSVGPathSegClosePath() {
-        //throw new RuntimeException(" !!! createSVGPathSegClosePath()");
         return new SVGPathSegClosePath(){
                 public short getPathSegType(){
                     return SVGPathSeg.PATHSEG_CLOSEPATH;
diff --git a/sources/org/apache/batik/dom/svg/SVGOMSVGElement.java b/sources/org/apache/batik/dom/svg/SVGOMSVGElement.java
index 8914be7..9c05fb0 100644
--- a/sources/org/apache/batik/dom/svg/SVGOMSVGElement.java
+++ b/sources/org/apache/batik/dom/svg/SVGOMSVGElement.java
@@ -393,7 +393,7 @@
         return tr;
     }
     public Element         getElementById ( String elementId ) {
-        return ((SVGOMDocument)getDocument()).getElementById(elementId);
+        return ownerDocument.getChildElementById(this, elementId);
     }
 
     // SVGLocatable ///////////////////////////////////////////////////////
diff --git a/sources/org/apache/batik/dom/svg/SVGPathContext.java b/sources/org/apache/batik/dom/svg/SVGPathContext.java
new file mode 100644
index 0000000..4980467
--- /dev/null
+++ b/sources/org/apache/batik/dom/svg/SVGPathContext.java
@@ -0,0 +1,35 @@
+/*
+
+   Copyright 2005 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.
+   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.batik.dom.svg;
+
+import java.awt.geom.Point2D;
+
+/**
+ * Context class for the SVG path element to support extra
+ * methods.
+ *
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
+ * @version $Id$
+ */
+public interface SVGPathContext extends SVGContext {
+
+    public float getTotalLength();
+
+    public Point2D getPointAtLength(float distance);
+};
diff --git a/sources/org/apache/batik/dom/svg/SVGPathSupport.java b/sources/org/apache/batik/dom/svg/SVGPathSupport.java
new file mode 100644
index 0000000..c407e8c
--- /dev/null
+++ b/sources/org/apache/batik/dom/svg/SVGPathSupport.java
@@ -0,0 +1,78 @@
+/*
+
+   Copyright 2005 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.
+   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.batik.dom.svg;
+
+import java.awt.geom.Point2D;
+
+import org.w3c.dom.svg.SVGPoint;
+import org.w3c.dom.svg.SVGMatrix;
+import org.w3c.dom.DOMException;
+
+/**
+ * The clas provides support for the SVGPath interface.
+ *
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
+ * @version $Id$
+ */
+public class SVGPathSupport {
+
+    /**
+     * To implement {@link org.w3c.dom.svg.SVGPathElement#getTotalLength()}.
+     */
+    public static float getTotalLength(SVGOMPathElement path) {
+        SVGPathContext pathCtx = (SVGPathContext)path.getSVGContext();
+        return pathCtx.getTotalLength();
+    }
+
+
+    /**
+     * To implement {@link org.w3c.dom.svg.SVGPathElement#getPointAtLength(float)}.
+     */
+    public static SVGPoint getPointAtLength(final SVGOMPathElement path,
+                                            final float distance) {
+        final SVGPathContext pathCtx = (SVGPathContext)path.getSVGContext();
+        if (pathCtx == null) return null;
+
+        return new SVGPoint() {
+                public float getX() {
+                    Point2D pt = pathCtx.getPointAtLength(distance);
+                    return (float)pt.getX();
+                }
+                public float getY() {
+                    Point2D pt = pathCtx.getPointAtLength(distance);
+                    return (float)pt.getY();
+                }
+                public void setX(float x) throws DOMException {
+                    throw path.createDOMException
+                        (DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                         "readonly.point", null);
+                }
+                public void setY(float y) throws DOMException {
+                    throw path.createDOMException
+                        (DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                         "readonly.point", null);
+                }
+                public SVGPoint matrixTransform ( SVGMatrix matrix ) {
+                    throw path.createDOMException
+                        (DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                         "readonly.point", null);
+                }
+            };
+    }
+};
diff --git a/sources/org/apache/batik/dom/svg/SVGPreserveAspectRatioSupport.java b/sources/org/apache/batik/dom/svg/SVGPreserveAspectRatioSupport.java
index 27ede70..364b7a7 100644
--- a/sources/org/apache/batik/dom/svg/SVGPreserveAspectRatioSupport.java
+++ b/sources/org/apache/batik/dom/svg/SVGPreserveAspectRatioSupport.java
@@ -22,7 +22,7 @@
 import org.w3c.dom.svg.SVGAnimatedPreserveAspectRatio;
 
 /**
- *
+ * Support for the 'preserveAspectRatio' interface on the SVG element.
  * @author  Tonny Kohar
  */
 public class SVGPreserveAspectRatioSupport {
diff --git a/sources/org/apache/batik/dom/svg/SVGSVGContext.java b/sources/org/apache/batik/dom/svg/SVGSVGContext.java
index ea0322c..586e8ad 100644
--- a/sources/org/apache/batik/dom/svg/SVGSVGContext.java
+++ b/sources/org/apache/batik/dom/svg/SVGSVGContext.java
@@ -30,7 +30,7 @@
  * methods but for now it will have methods to do intersection
  * and enclosure checking.
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public interface SVGSVGContext extends SVGContext {
@@ -53,17 +53,18 @@
      * Returns true if the given DOM element intersects
      * <tt>svgRect</tt>.
      */
-  public boolean       checkIntersection (Element element, SVGRect rect );
+    public boolean       checkIntersection (Element element, SVGRect rect );
+
     /**
      * Returns true if the given DOM element is enclosed in the
      * <tt>svgRect</tt>.
      */
-  public boolean       checkEnclosure (Element element, SVGRect rect );
+    public boolean       checkEnclosure (Element element, SVGRect rect );
 
     /**
      * Used to inform the user agent that the text selection should be
      * cleared.
      */
-    void deselectAll();
+    public void deselectAll();
 
 };
diff --git a/sources/org/apache/batik/dom/util/ListNodeList.java b/sources/org/apache/batik/dom/util/ListNodeList.java
index 5f5ff3f..d468a42 100644
--- a/sources/org/apache/batik/dom/util/ListNodeList.java
+++ b/sources/org/apache/batik/dom/util/ListNodeList.java
@@ -27,7 +27,7 @@
  * A simple class that implements the DOM NodeList interface by
  * wrapping an Java List instace.
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class ListNodeList implements NodeList {
@@ -48,7 +48,6 @@
 
     /**
      * <b>DOM</b>: Implements {@link NodeList#getLength()}.
-     * @return {@link #size}.
      */
     public int getLength() {
         return list.size();
diff --git a/sources/org/apache/batik/dom/util/SAXDocumentFactory.java b/sources/org/apache/batik/dom/util/SAXDocumentFactory.java
index 2f3ef74..b2ae0c3 100755
--- a/sources/org/apache/batik/dom/util/SAXDocumentFactory.java
+++ b/sources/org/apache/batik/dom/util/SAXDocumentFactory.java
@@ -386,9 +386,6 @@
 
     /**
      * Creates a Document.
-     * @param ns The namespace URI of the root element.
-     * @param root The name of the root element.
-     * @param uri The document URI.
      * @param is  The document input source.
      * @exception IOException if an error occured while reading the document.
      */
@@ -529,7 +526,7 @@
 
     /**
      * <b>SAX</b>: Implements {@link
-     * ContentHandler#startElement(String,String,String,Attributes)}.
+     * org.xml.sax.ContentHandler#startElement(String,String,String,Attributes)}.
      */
     public void startElement(String     uri,
 			     String     localName,
diff --git a/sources/org/apache/batik/ext/awt/LinearGradientPaint.java b/sources/org/apache/batik/ext/awt/LinearGradientPaint.java
index 15f52a9..d510d21 100644
--- a/sources/org/apache/batik/ext/awt/LinearGradientPaint.java
+++ b/sources/org/apache/batik/ext/awt/LinearGradientPaint.java
@@ -29,7 +29,7 @@
 
 /**
  * The <code>LinearGradientPaint</code> class provides a way to fill
- * a {@link Shape} with a linear color gradient pattern.  The user may
+ * a {@link java.awt.Shape} with a linear color gradient pattern.  The user may
  * specify 2 or more gradient colors, and this paint will provide an
  * interpolation between each color.  The user also specifies start and end
  * points which define where in user space the color gradient should begin 
@@ -85,7 +85,6 @@
  * @see java.awt.Graphics2D#setPaint
  *
  */
-
 public final class LinearGradientPaint extends MultipleGradientPaint {
 
     /** Gradient start and end points. */
diff --git a/sources/org/apache/batik/ext/awt/LinearGradientPaintContext.java b/sources/org/apache/batik/ext/awt/LinearGradientPaintContext.java
index 6879e06..b8fc699 100644
--- a/sources/org/apache/batik/ext/awt/LinearGradientPaintContext.java
+++ b/sources/org/apache/batik/ext/awt/LinearGradientPaintContext.java
@@ -70,9 +70,9 @@
      *  @param hints the hints that the context object uses to choose
      *  between rendering alternatives
      *
-     *  @param start gradient start point, in user space
+     *  @param dStart gradient start point, in user space
      *
-     *  @param end gradient end point, in user space
+     *  @param dEnd gradient end point, in user space
      *
      *  @param fractions the fractions specifying the gradient distribution
      *
diff --git a/sources/org/apache/batik/ext/awt/MultipleGradientPaint.java b/sources/org/apache/batik/ext/awt/MultipleGradientPaint.java
index 4ef3e77..9a251f9 100644
--- a/sources/org/apache/batik/ext/awt/MultipleGradientPaint.java
+++ b/sources/org/apache/batik/ext/awt/MultipleGradientPaint.java
@@ -108,8 +108,6 @@
      *
      * @throws IllegalArgumentException if fractions.length != colors.length,
      * or if colors is less than 2 in size, or if an enumerated value is bad.
-     *
-     * @see PaintContext
      */
     public MultipleGradientPaint(float[] fractions,
                                  Color[] colors,
@@ -211,7 +209,6 @@
      * Returns the transparency mode for this LinearGradientPaint.
      * @return an integer value representing this LinearGradientPaint object's
      * transparency mode.
-     * @see Transparency
      */
     public int getTransparency() {
         return transparency;
diff --git a/sources/org/apache/batik/ext/awt/g2d/AbstractGraphics2D.java b/sources/org/apache/batik/ext/awt/g2d/AbstractGraphics2D.java
index 1917401..b7bdaaa 100644
--- a/sources/org/apache/batik/ext/awt/g2d/AbstractGraphics2D.java
+++ b/sources/org/apache/batik/ext/awt/g2d/AbstractGraphics2D.java
@@ -910,11 +910,10 @@
      * img1 = op.filter(img, null);
      * drawImage(img1, new AffineTransform(1f,0f,0f,1f,x,y), null);
      * </pre>
-     * @param op the filter to be applied to the image before rendering
      * @param img the <code>BufferedImage</code> to be rendered
-     * @param x,&nbsp;y the location in user space where the upper left
-     * corner of the
-     * image is rendered
+     * @param op the filter to be applied to the image before rendering
+     * @param x the x coordinate in user space where the image is rendered
+     * @param y the y coordinate in user space where the image is rendered
      * @see #transform
      * @see #setTransform
      * @see #setComposite
@@ -944,8 +943,10 @@
      * screen.
      *
      * @param g the <code>GlyphVector</code> to be rendered
-     * @param x,&nbsp;y the position in User Space where the glyphs should
-     * be rendered
+     * @param x the x position in user space where the glyphs should be
+     *        rendered
+     * @param y the y position in user space where the glyphs should be
+     *        rendered
      *
      * @see java.awt.Font#createGlyphVector
      * @see java.awt.font.GlyphVector
@@ -1039,10 +1040,8 @@
      * @param paint the <code>Paint</code> object to be used to generate
      * color during the rendering process, or <code>null</code>
      * @see java.awt.Graphics#setColor
-     * @see GradientPaint
-     * @see TexturePaint
      */
-    public void setPaint( Paint paint ){
+    public void setPaint(Paint paint) {
         gc.setPaint(paint);
     }
 
@@ -1051,7 +1050,6 @@
      * Sets the <code>Stroke</code> for the <code>Graphics2D</code> context.
      * @param s the <code>Stroke</code> object to be used to stroke a
      * <code>Shape</code> during the rendering process
-     * @see BasicStroke
      */
     public void setStroke(Stroke s){
         gc.setStroke(s);
@@ -1202,7 +1200,8 @@
      * Rotating with a positive angle theta rotates points on the positive
      * x axis toward the positive y axis.
      * @param theta the angle of rotation in radians
-     * @param x,&nbsp;y coordinates of the origin of the rotation
+     * @param x the x coordinate of the origin of the rotation
+     * @param y the y coordinate of the origin of the rotation
      */
     public void rotate(double theta, double x, double y){
         gc.rotate(theta, x, y);
@@ -1382,9 +1381,9 @@
      * The <i>user clip</i> modified by this method is independent of the
      * clipping associated with device bounds and visibility.  If no clip has
      * previously been set, or if the clip has been cleared using
-     * {@link Graphics#setClip(Shape) setClip} with a <code>null</code>
-     * argument, the specified <code>Shape</code> becomes the new
-     * user clip.
+     * {@link java.awt.Graphics#setClip(Shape) setClip} with a
+     * <code>null</code> argument, the specified <code>Shape</code> becomes
+     * the new user clip.
      * @param s the <code>Shape</code> to be intersected with the current
      *          <code>Clip</code>.  If <code>s</code> is <code>null</code>,
      *          this method clears the current <code>Clip</code>.
@@ -1418,4 +1417,11 @@
     public FontRenderContext getFontRenderContext(){
         return gc.getFontRenderContext();
     }
+
+    /**
+     * @return the {@link GraphicContext} of this <code>Graphics2D</code>.
+     */    
+    public GraphicContext getGraphicContext() {
+        return gc;
+    }
 }
diff --git a/sources/org/apache/batik/ext/awt/g2d/DefaultGraphics2D.java b/sources/org/apache/batik/ext/awt/g2d/DefaultGraphics2D.java
index 768ceff..cd52e63 100644
--- a/sources/org/apache/batik/ext/awt/g2d/DefaultGraphics2D.java
+++ b/sources/org/apache/batik/ext/awt/g2d/DefaultGraphics2D.java
@@ -264,8 +264,10 @@
      * left, in which case the coordinate supplied is the location of the
      * leftmost character on the baseline.
      * @param s the <code>String</code> to be rendered
-     * @param x,&nbsp;y the coordinates where the <code>String</code>
-     * should be rendered
+     * @param x the x coordinate where the <code>String</code> should be
+     *          rendered
+     * @param y the y coordinate where the <code>String</code> should be
+     *          rendered
      * @see #setPaint
      * @see java.awt.Graphics#setColor
      * @see java.awt.Graphics#setFont
@@ -292,8 +294,8 @@
      * coordinate supplied is the location of the leftmost character
      * on the baseline.
      * @param iterator the iterator whose text is to be rendered
-     * @param x,&nbsp;y the coordinates where the iterator's text is to be
-     * rendered
+     * @param x the x coordinate where the iterator's text is to be rendered
+     * @param y the y coordinate where the iterator's text is to be rendered
      * @see #setPaint
      * @see java.awt.Graphics#setColor
      * @see #setTransform
diff --git a/sources/org/apache/batik/ext/awt/g2d/GraphicContext.java b/sources/org/apache/batik/ext/awt/g2d/GraphicContext.java
index 1f6b1e5..60ffca0 100644
--- a/sources/org/apache/batik/ext/awt/g2d/GraphicContext.java
+++ b/sources/org/apache/batik/ext/awt/g2d/GraphicContext.java
@@ -53,7 +53,7 @@
     /**
      * Default Transform to be used for creating FontRenderContext.
      */
-    private AffineTransform defaultTransform = new AffineTransform();
+    protected AffineTransform defaultTransform = new AffineTransform();
 
     /**
      * Current AffineTransform. This is the concatenation
@@ -61,63 +61,63 @@
      * invocation) and the following transform invocations,
      * as captured by originalTransform and the transformStack.
      */
-    private AffineTransform transform = new AffineTransform();
+    protected AffineTransform transform = new AffineTransform();
 
     /**
      * Transform stack
      */
-    private Vector transformStack = new Vector();
+    protected Vector transformStack = new Vector();
 
     /**
      * Defines whether the transform stack is valide or not.
      * This is for use by the class clients. The client should
      * validate the stack every time it starts using it. The
      * stack becomes invalid when a new transform is set.
-     * @see #invalidatTransformStack
+     * @see #invalidateTransformStack()
      * @see #isTransformStackValid
      * @see #setTransform
      */
-    private boolean transformStackValid = true;
+    protected boolean transformStackValid = true;
 
     /**
      * Current Paint
      */
-    private Paint paint = Color.black;
+    protected Paint paint = Color.black;
 
     /**
      * Current Stroke
      */
-    private Stroke stroke = new BasicStroke();
+    protected Stroke stroke = new BasicStroke();
 
     /**
      * Current Composite
      */
-    private Composite composite = AlphaComposite.SrcOver;
+    protected Composite composite = AlphaComposite.SrcOver;
 
     /**
      * Current clip
      */
-    private Shape clip = null;
+    protected Shape clip = null;
 
     /**
      * Current set of RenderingHints
      */
-    private RenderingHints hints = new RenderingHints(null);
+    protected RenderingHints hints = new RenderingHints(null);
 
     /**
      * Current Font
      */
-    private Font font = new Font("sanserif", Font.PLAIN, 12);
+    protected Font font = new Font("sanserif", Font.PLAIN, 12);
 
     /**
      * Current background color.
      */
-    private Color background = new Color(0, 0, 0, 0);
+    protected Color background = new Color(0, 0, 0, 0);
 
     /**
      * Current foreground color
      */
-    private Color foreground = Color.black;
+    protected Color foreground = Color.black;
 
     /**
      * Default constructor
@@ -397,8 +397,8 @@
      * @param paint the <code>Paint</code> object to be used to generate
      * color during the rendering process, or <code>null</code>
      * @see java.awt.Graphics#setColor
-     * @see GradientPaint
-     * @see TexturePaint
+     * @see java.awt.GradientPaint
+     * @see java.awt.TexturePaint
      */
     public void setPaint( Paint paint ){
         if(paint == null)
@@ -583,7 +583,8 @@
      * Rotating with a positive angle theta rotates points on the positive
      * x axis toward the positive y axis.
      * @param theta the angle of rotation in radians
-     * @param x,&nbsp;y coordinates of the origin of the rotation
+     * @param x x coordinate of the origin of the rotation
+     * @param y y coordinate of the origin of the rotation
      */
     public void rotate(double theta, double x, double y){
         transform.rotate(theta, x, y);
@@ -709,7 +710,7 @@
      * since it was last read. Only validateTransformStack
      * can override this memento
      */
-    void invalidateTransformStack(){
+    protected void invalidateTransformStack(){
         transformStack.removeAllElements();
         transformStackValid = false;
     }
@@ -808,9 +809,9 @@
      * The <i>user clip</i> modified by this method is independent of the
      * clipping associated with device bounds and visibility.  If no clip has
      * previously been set, or if the clip has been cleared using
-     * {@link Graphics#setClip(Shape) setClip} with a <code>null</code>
-     * argument, the specified <code>Shape</code> becomes the new
-     * user clip.
+     * {@link java.awt.Graphics#setClip(Shape) setClip} with a
+     * <code>null</code> argument, the specified <code>Shape</code> becomes
+     * the new user clip.
      * @param s the <code>Shape</code> to be intersected with the current
      *          <code>Clip</code>.  If <code>s</code> is <code>null</code>,
      *          this method clears the current <code>Clip</code>.
diff --git a/sources/org/apache/batik/ext/awt/g2d/TransformType.java b/sources/org/apache/batik/ext/awt/g2d/TransformType.java
index 165d692..016b349 100644
--- a/sources/org/apache/batik/ext/awt/g2d/TransformType.java
+++ b/sources/org/apache/batik/ext/awt/g2d/TransformType.java
@@ -82,11 +82,14 @@
     }
 
     /**
-     * Convenience for enumeration switching
-     * i.e. switch(transformType.toInt()){
+     * Convenience for enumeration switching.
+     * That is,
+     * <pre>
+     *   switch(transformType.toInt()){
      *       case TransformType.TRANSFORM_TRANSLATE:
      *        ....
      *       case TransformType.TRANSFORM_ROTATE:
+     * </pre>
      */
     public int toInt(){
         return val;
diff --git a/sources/org/apache/batik/ext/awt/geom/AbstractSegment.java b/sources/org/apache/batik/ext/awt/geom/AbstractSegment.java
index d723284..990c487 100644
--- a/sources/org/apache/batik/ext/awt/geom/AbstractSegment.java
+++ b/sources/org/apache/batik/ext/awt/geom/AbstractSegment.java
@@ -1,11 +1,20 @@
-/**************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.     *
- * ---------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software      *
- * License version 1.1, a copy of which has been included with this       *
- * distribution in the LICENSE file.                                      *
- **************************************************************************/
+/*
 
+   Copyright 2003 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.
+   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.batik.ext.awt.geom;
 
 import java.util.Arrays;
@@ -15,13 +24,18 @@
 import java.io.PrintStream;
 import java.io.FileOutputStream;
 
+/**
+ * An abstract class for path segments.
+ *
+ * @version $Id$
+ */
 public abstract class AbstractSegment implements Segment {
 
     private static final double rt3 = 1.7320508075689;
 
     protected abstract int findRoots(double y, double [] roots);
 
-    public SplitResults split(double y) {
+    public Segment.SplitResults split(double y) {
         double [] roots = { 0, 0, 0 };
         int numSol = findRoots(y, roots);
         if (numSol == 0) return null; // No split
diff --git a/sources/org/apache/batik/ext/awt/geom/Cubic.java b/sources/org/apache/batik/ext/awt/geom/Cubic.java
index 81a630a..6b79a89 100644
--- a/sources/org/apache/batik/ext/awt/geom/Cubic.java
+++ b/sources/org/apache/batik/ext/awt/geom/Cubic.java
@@ -1,11 +1,20 @@
-/**************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.     *
- * ---------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software      *
- * License version 1.1, a copy of which has been included with this       *
- * distribution in the LICENSE file.                                      *
- **************************************************************************/
+/*
 
+   Copyright 2003 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.
+   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.batik.ext.awt.geom;
 
 import java.awt.geom.CubicCurve2D;
@@ -13,6 +22,11 @@
 import java.awt.geom.QuadCurve2D;
 import java.awt.geom.Rectangle2D;
 
+/**
+ * A class representing a cubic path segment.
+ *
+ * @version $Id$
+ */
 public class Cubic extends AbstractSegment {
 
     public Point2D.Double p1, p2, p3, p4;
diff --git a/sources/org/apache/batik/ext/awt/geom/ExtendedGeneralPath.java b/sources/org/apache/batik/ext/awt/geom/ExtendedGeneralPath.java
index 515ae5e..0fb1b1c 100644
--- a/sources/org/apache/batik/ext/awt/geom/ExtendedGeneralPath.java
+++ b/sources/org/apache/batik/ext/awt/geom/ExtendedGeneralPath.java
@@ -90,9 +90,10 @@
      * indicate if we increase or decrease the angles and the final
      * point of the arc.
      *
-     * @param rx,&nbsp;ry the radii of the ellipse
+     * @param rx the x radius of the ellipse
+     * @param ry the y radius of the ellipse
      *
-     * @param theta the angle from the x-axis of the current
+     * @param angle the angle from the x-axis of the current
      * coordinate system to the x-axis of the ellipse in degrees.
      *
      * @param largeArcFlag the large arc flag. If true the arc
@@ -103,8 +104,8 @@
      * center to arc sweeps through decreasing angles otherwise it
      * sweeps through increasing angles
      *
-     * @param x,&nbsp;y the absolute coordinates of the final point of
-     * the arc.
+     * @param x the absolute x coordinate of the final point of the arc.
+     * @param y the absolute y coordinate of the final point of the arc.
      */
     public synchronized void arcTo(float rx, float ry,
                                    float angle,
diff --git a/sources/org/apache/batik/ext/awt/geom/Linear.java b/sources/org/apache/batik/ext/awt/geom/Linear.java
index c29b50a..6b5d255 100644
--- a/sources/org/apache/batik/ext/awt/geom/Linear.java
+++ b/sources/org/apache/batik/ext/awt/geom/Linear.java
@@ -1,11 +1,20 @@
-/**************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.     *
- * ---------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software      *
- * License version 1.1, a copy of which has been included with this       *
- * distribution in the LICENSE file.                                      *
- **************************************************************************/
+/*
 
+   Copyright 2003 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.
+   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.batik.ext.awt.geom;
 
 import java.util.Arrays;
@@ -14,6 +23,11 @@
 import java.io.PrintStream;
 import java.io.FileOutputStream;
 
+/**
+ * A class representing a linear path segment.
+ *
+ * @version $Id$
+ */
 public class Linear implements Segment {
     public Point2D.Double p1, p2;
 
@@ -86,7 +100,7 @@
         return new Point2D.Double(x, y);
     }
 
-    public SplitResults split(double y) {
+    public Segment.SplitResults split(double y) {
         if ((y == p1.y) || (y == p2.y)) return null;
         if ((y <= p1.y) && (y <= p2.y)) return null;
         if ((y >= p1.y) && (y >= p2.y)) return null;
@@ -100,8 +114,8 @@
         Segment [] t1 = {getSegment(t,1)};
 
         if (p2.y < y)
-            return new SplitResults(t0, t1);
-        return new SplitResults(t1, t0);
+            return new Segment.SplitResults(t0, t1);
+        return new Segment.SplitResults(t1, t0);
     }
 
     public Segment getSegment(double t0, double t1) {
@@ -143,9 +157,9 @@
 
     /**
      * Subdivides this Cubic curve into two curves at t = 0.5.
-     * can be done with getSegment but this is more efficent.
-     * @param c0 if non-null contains portion of curve from  0->.5
-     * @param c1 if non-null contains portion of curve from .5->1
+     * Can be done with getSegment but this is more efficent.
+     * @param l0 if non-null contains portion of curve from  0->.5
+     * @param l1 if non-null contains portion of curve from .5->1
      */
     public void subdivide(Linear l0, Linear l1) {
         if ((l0 == null) && (l1 == null)) return;
@@ -168,10 +182,11 @@
     }
 
     /**
-     * Subdivides this Cubic curve into two curves at t = 0.5.
-     * can be done with getSegment but this is more efficent.
-     * @param c0 if non-null contains portion of curve from  0->.5
-     * @param c1 if non-null contains portion of curve from .5->1
+     * Subdivides this Cubic curve into two curves.
+     * Can be done with getSegment but this is more efficent.
+     * @param t position to split the curve
+     * @param l0 if non-null contains portion of curve from  0->t
+     * @param l1 if non-null contains portion of curve from t->1
      */
     public void subdivide(double t, Linear l0, Linear l1) {
         if ((l0 == null) && (l1 == null)) return;
@@ -199,9 +214,7 @@
         return Math.sqrt(dx*dx+dy*dy);
     }
     public double getLength(double maxErr) {
-        double dx = p2.x-p1.x;
-        double dy = p2.y-p1.y;
-        return Math.sqrt(dx*dx+dy*dy);
+        return getLength();
     }
 
     public String toString() { 
diff --git a/sources/org/apache/batik/ext/awt/geom/PathLength.java b/sources/org/apache/batik/ext/awt/geom/PathLength.java
index b3be9ae..6c3a7bb 100644
--- a/sources/org/apache/batik/ext/awt/geom/PathLength.java
+++ b/sources/org/apache/batik/ext/awt/geom/PathLength.java
@@ -250,7 +250,7 @@
 
     }
 
-    private int findUpperIndex(float length) {
+    public int findUpperIndex(float length) {
         if (!initialised)
             initialise();
 
diff --git a/sources/org/apache/batik/ext/awt/geom/Quadradic.java b/sources/org/apache/batik/ext/awt/geom/Quadradic.java
index cf8000c..8d013f6 100644
--- a/sources/org/apache/batik/ext/awt/geom/Quadradic.java
+++ b/sources/org/apache/batik/ext/awt/geom/Quadradic.java
@@ -1,11 +1,20 @@
-/**************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.     *
- * ---------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software      *
- * License version 1.1, a copy of which has been included with this       *
- * distribution in the LICENSE file.                                      *
- **************************************************************************/
+/*
 
+   Copyright 2003 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.
+   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.batik.ext.awt.geom;
 
 import java.awt.geom.CubicCurve2D;
@@ -13,6 +22,11 @@
 import java.awt.geom.QuadCurve2D;
 import java.awt.geom.Rectangle2D;
 
+/**
+ * A class representing a quadratic path segment.
+ *
+ * @version $Id$
+ */
 public class Quadradic extends AbstractSegment {
     public Point2D.Double p1, p2, p3;
 
diff --git a/sources/org/apache/batik/ext/awt/geom/Segment.java b/sources/org/apache/batik/ext/awt/geom/Segment.java
index ac5c810..19d6e17 100644
--- a/sources/org/apache/batik/ext/awt/geom/Segment.java
+++ b/sources/org/apache/batik/ext/awt/geom/Segment.java
@@ -1,16 +1,30 @@
-/**************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.     *
- * ---------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software      *
- * License version 1.1, a copy of which has been included with this       *
- * distribution in the LICENSE file.                                      *
- **************************************************************************/
+/*
 
+   Copyright 2003 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.
+   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.batik.ext.awt.geom;
 
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
 
+/**
+ * An interface that path segments must implement.
+ *
+ * @version $Id$
+ */
 public interface Segment extends Cloneable {
     public double minX();
     public double maxX();
diff --git a/sources/org/apache/batik/ext/awt/geom/SegmentList.java b/sources/org/apache/batik/ext/awt/geom/SegmentList.java
index bb22130..fdc12bc 100644
--- a/sources/org/apache/batik/ext/awt/geom/SegmentList.java
+++ b/sources/org/apache/batik/ext/awt/geom/SegmentList.java
@@ -1,11 +1,20 @@
-/**************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.     *
- * ---------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software      *
- * License version 1.1, a copy of which has been included with this       *
- * distribution in the LICENSE file.                                      *
- **************************************************************************/
+/*
 
+   Copyright 2003 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.
+   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.batik.ext.awt.geom;
 
 import java.awt.Shape;
@@ -16,6 +25,11 @@
 import java.util.LinkedList;
 import java.util.Iterator;
 
+/**
+ * A class representing a list of path segments.
+ *
+ * @version $Id$
+ */
 public class SegmentList {
     List segments = new LinkedList();
 
@@ -89,7 +103,7 @@
 
     public int size() { return segments.size(); }
 
-    public SplitResults split(double y) {
+    public SegmentList.SplitResults split(double y) {
         Iterator iter = segments.iterator();
         SegmentList above = null;
         SegmentList below = null;
@@ -125,10 +139,10 @@
                 below.add(resBelow[i]);
             }
         }
-        return new SplitResults(above, below);
+        return new SegmentList.SplitResults(above, below);
     }
 
-    public class SplitResults {
+    public static class SplitResults {
         SegmentList above, below;
         public SplitResults(SegmentList above, SegmentList below) {
             this.above = above;
diff --git a/sources/org/apache/batik/ext/awt/image/AbstractLight.java b/sources/org/apache/batik/ext/awt/image/AbstractLight.java
index 985e3f1..08e7baa 100644
--- a/sources/org/apache/batik/ext/awt/image/AbstractLight.java
+++ b/sources/org/apache/batik/ext/awt/image/AbstractLight.java
@@ -22,7 +22,7 @@
 /**
  * An abstract implementation of the Light interface.
  *
- * @author <a href="mailto:deweese@apache.org>Thomas DeWeese</a>
+ * @author <a href="mailto:deweese@apache.org">Thomas DeWeese</a>
  * @version $Id$
  */
 public abstract class AbstractLight implements Light {
@@ -119,7 +119,7 @@
      * @param dx delta x for computing light vectors in user space
      * @param width number of samples to compute on the x axis
      * @param z array containing the z elevation for all the points
-     * @param lightRwo array to store the light info to, if null it will
+     * @param lightRow array to store the light info to, if null it will
      *                 be allocated for you and returned.
      *
      * @return an array width columns where each element
diff --git a/sources/org/apache/batik/ext/awt/image/DistantLight.java b/sources/org/apache/batik/ext/awt/image/DistantLight.java
index 1f9f80d..f7d6aa2 100644
--- a/sources/org/apache/batik/ext/awt/image/DistantLight.java
+++ b/sources/org/apache/batik/ext/awt/image/DistantLight.java
@@ -23,7 +23,7 @@
  * A light source placed at the infinity, such that the light angle is
  * constant over the whole surface.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public class DistantLight extends AbstractLight {
@@ -100,7 +100,7 @@
      * @param dx delta x for computing light vectors in user space
      * @param width number of samples to compute on the x axis
      * @param z array containing the z elevation for all the points
-     * @param lightRwo array to store the light info to, if null it will
+     * @param lightRow array to store the light info to, if null it will
      *                 be allocated for you and returned.
      *
      * @return an array width columns where each element
diff --git a/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java b/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java
index fe57379..f78744f 100644
--- a/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java
+++ b/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java
@@ -127,12 +127,15 @@
         else
             at.preConcatenate(g2dAt);
 
-        ColorModel  srcCM = cr.getColorModel();
-        ColorSpace g2dCS = getDestinationColorSpace(g2d);
+        ColorModel srcCM = cr.getColorModel();
         ColorModel g2dCM = getDestinationColorModel(g2d);
+        ColorSpace g2dCS = null;
+        if (g2dCM != null)
+            g2dCS = g2dCM.getColorSpace();
         if (g2dCS == null)
             // Assume device is sRGB
             g2dCS = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+
         ColorModel drawCM = g2dCM;
         if ((g2dCM == null) || !g2dCM.hasAlpha()) {
             // If we can't find out about our device or the device
@@ -513,6 +516,8 @@
             return bi.getColorModel();
 
         GraphicsConfiguration gc = g2d.getDeviceConfiguration();
+        if (gc == null) 
+            return null; // Can't tell
 
         // We are going to a BufferedImage but no hint was provided
         // so we can't determine the destination Color Model.
@@ -1099,7 +1104,7 @@
      * @param src The source
      * @param srcRect The Rectangle of source data to be copied
      * @param dst The destination
-     * @param dstP The Place for the upper left corner of srcRect in dst.
+     * @param destP The Place for the upper left corner of srcRect in dst.
      */
     public static void
         copyData(BufferedImage src, Rectangle srcRect,
diff --git a/sources/org/apache/batik/ext/awt/image/Light.java b/sources/org/apache/batik/ext/awt/image/Light.java
index 249f0de..2dbaab3 100644
--- a/sources/org/apache/batik/ext/awt/image/Light.java
+++ b/sources/org/apache/batik/ext/awt/image/Light.java
@@ -25,7 +25,7 @@
  * typically in a 3 dimensional space and the methods assumes the surface
  * is at elevation 0.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public interface Light {
@@ -76,7 +76,7 @@
      * @param dx delta x for computing light vectors in user space
      * @param width number of samples to compute on the x axis
      * @param z array containing the z elevation for all the points
-     * @param lightRwo array to store the light info to, if null it will
+     * @param lightRow array to store the light info to, if null it will
      *                 be allocated for you and returned.
      *
      * @return an array width columns where each element
diff --git a/sources/org/apache/batik/ext/awt/image/PointLight.java b/sources/org/apache/batik/ext/awt/image/PointLight.java
index 99b2323..dec7095 100644
--- a/sources/org/apache/batik/ext/awt/image/PointLight.java
+++ b/sources/org/apache/batik/ext/awt/image/PointLight.java
@@ -22,7 +22,7 @@
 /**
  * A light source which emits a light of constant intensity in all directions.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public class PointLight extends AbstractLight {
diff --git a/sources/org/apache/batik/ext/awt/image/SpotLight.java b/sources/org/apache/batik/ext/awt/image/SpotLight.java
index 7a502a2..2eac2cb 100644
--- a/sources/org/apache/batik/ext/awt/image/SpotLight.java
+++ b/sources/org/apache/batik/ext/awt/image/SpotLight.java
@@ -22,7 +22,7 @@
 /**
  * A light source which emits a light of constant intensity in all directions.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public class SpotLight extends AbstractLight {
diff --git a/sources/org/apache/batik/ext/awt/image/codec/SingleTileRenderedImage.java b/sources/org/apache/batik/ext/awt/image/codec/SingleTileRenderedImage.java
index 9fb452c..fa604f2 100644
--- a/sources/org/apache/batik/ext/awt/image/codec/SingleTileRenderedImage.java
+++ b/sources/org/apache/batik/ext/awt/image/codec/SingleTileRenderedImage.java
@@ -34,8 +34,8 @@
      * and a ColorModel.
      *
      * @param ras A Raster that will define tile (0, 0) of the image.
-     * @param cm A ColorModel that will serve as the image's
-     *           ColorModel.
+     * @param colorModel A ColorModel that will serve as the image's
+     *                   ColorModel.
      */
     public SingleTileRenderedImage(Raster ras, ColorModel colorModel) {
         this.ras = ras;
diff --git a/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDirectory.java b/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDirectory.java
index 62eef46..1e8dac6 100644
--- a/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDirectory.java
+++ b/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDirectory.java
@@ -604,8 +604,8 @@
 
     /**
      * Returns a boolean indicating whether the byte order used in the
-     * the TIFF file is big-endian (i.e. whether the byte order is from  
-     * the most significant to the least significant)
+     * the TIFF file is big-endian.  That is, whether the byte order is from  
+     * the most significant to the least significant.
      */
     public boolean isBigEndian() {
 	return isBigEndian;
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/AbstractRable.java b/sources/org/apache/batik/ext/awt/image/renderable/AbstractRable.java
index ebd4ece..50e5b73 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/AbstractRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/AbstractRable.java
@@ -124,8 +124,6 @@
      * can be called long after the object is constructed to reset the
      * state of the Renderable.
      * @param src will become the first (and only) member of the srcs Vector.
-     * @param bounds defines the extent of this Rable in it's user
-     * coordinate system.
      */
     protected void init(Filter src) {
         touch();
@@ -142,8 +140,6 @@
      * state of the Renderable.
      * @param src will also be set as the first (and only) member of
      * the srcs Vector.
-     * @param bounds defines the extent of this Rable in it's user
-     * coordinate system.
      * @param props use to set the properties on this renderable image.
      * Always clears the current properties (even if null).
      */
@@ -159,8 +155,6 @@
      * possibly a bounds.  This can be called long after the object is
      * constructed to reset the state of the Renderable.
      * @param srcs Used the create a new srcs Vector (old sources are dropped).
-     * @param bounds defines the new bounds of the object. If it is null
-     * then the bounds become the union of the bounds of all sources.
      */
     protected void init(List srcs) {
         touch();
@@ -172,8 +166,6 @@
      * possibly a bounds.  This can be called long after the object is
      * constructed to reset the state of the Renderable.
      * @param srcs Used the create a new srcs Vector (old sources are dropped).
-     * @param bounds defines the new bounds of the object. If it is null
-     * then the bounds become the union of the bounds of all sources.
      * @param props use to set the properties on this renderable image.
      * Always clears the current properties (even if null).
      */
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/ClipRable.java b/sources/org/apache/batik/ext/awt/image/renderable/ClipRable.java
index b9b6fd4..ed3bfa8 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/ClipRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/ClipRable.java
@@ -49,7 +49,7 @@
 
       /**
        * This returns the current image being clipped by the clip node.
-       * @returns The image to clip
+       * @return The image to clip
        */
     public Filter getSource();
 
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/ClipRable8Bit.java b/sources/org/apache/batik/ext/awt/image/renderable/ClipRable8Bit.java
index b08a45b..a0f165e 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/ClipRable8Bit.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/ClipRable8Bit.java
@@ -39,7 +39,7 @@
 /**
  * ClipRable implementation
  *
- * @author <a href="mailto:Thomas.DeWeese@Kodak.com>Thomas DeWeese</a>
+ * @author <a href="mailto:Thomas.DeWeese@Kodak.com">Thomas DeWeese</a>
  * @version $Id$
  */
 public class ClipRable8Bit
@@ -75,7 +75,7 @@
 
     /**
      * This returns the current image being masked by the mask node.
-     * @returns The image to mask
+     * @return The image to mask
      */
     public Filter getSource() {
         return (Filter)getSources().get(0);
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/DiffuseLightingRable.java b/sources/org/apache/batik/ext/awt/image/renderable/DiffuseLightingRable.java
index 45373a8..ac00314 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/DiffuseLightingRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/DiffuseLightingRable.java
@@ -31,7 +31,7 @@
  * This filter follows the specification of the feDiffuseLighting filter in 
  * the SVG 1.0 specification.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public interface DiffuseLightingRable extends FilterColorInterpolation {
@@ -51,7 +51,7 @@
     public Light getLight();
 
     /**
-     * @param New Light object
+     * @param light New Light object
      */
     public void setLight(Light light);
 
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/DiffuseLightingRable8Bit.java b/sources/org/apache/batik/ext/awt/image/renderable/DiffuseLightingRable8Bit.java
index be9e09f..07ae6f5 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/DiffuseLightingRable8Bit.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/DiffuseLightingRable8Bit.java
@@ -37,7 +37,7 @@
 /**
  * Implementation of the DiffuseLightRable interface.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public class DiffuseLightingRable8Bit
@@ -126,7 +126,7 @@
     }
 
     /**
-     * @param New Light object
+     * @param light New Light object
      */
     public void setLight(Light light){
         touch();
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/DisplacementMapRable.java b/sources/org/apache/batik/ext/awt/image/renderable/DisplacementMapRable.java
index 3bfcf81..6282d66 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/DisplacementMapRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/DisplacementMapRable.java
@@ -25,7 +25,7 @@
  * Implements a DisplacementMap operation, which takes pixel values from
  * another image to spatially displace the input image
  *
- * @author <a href="mailto:sheng.pei@eng.sun.com>Sheng Pei</a>
+ * @author <a href="mailto:sheng.pei@eng.sun.com">Sheng Pei</a>
  * @version $Id$
  */
 public interface DisplacementMapRable extends FilterColorInterpolation {
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/DisplacementMapRable8Bit.java b/sources/org/apache/batik/ext/awt/image/renderable/DisplacementMapRable8Bit.java
index 1f93b91..4cf0e27 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/DisplacementMapRable8Bit.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/DisplacementMapRable8Bit.java
@@ -35,7 +35,7 @@
  * Implements a DisplacementMap operation, which takes pixel values from
  * another image to spatially displace the input image
  *
- * @author <a href="mailto:sheng.pei@eng.sun.com>Sheng Pei</a>
+ * @author <a href="mailto:sheng.pei@eng.sun.com">Sheng Pei</a>
  * @version $Id$
  */
 public class DisplacementMapRable8Bit
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/FilterAlphaRable.java b/sources/org/apache/batik/ext/awt/image/renderable/FilterAlphaRable.java
index f5ffc5b..769957b 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/FilterAlphaRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/FilterAlphaRable.java
@@ -37,7 +37,7 @@
  * image according to the SVG SourceAlpha Filter description.
  * This sets RGB to black and Alpha to the source image's alpha channel.
  *
- * @author <a href="mailto:Thomas.DeWeese@Kodak.com>Thomas DeWeese</a>
+ * @author <a href="mailto:Thomas.DeWeese@Kodak.com">Thomas DeWeese</a>
  * @version $Id$
  */
 public class FilterAlphaRable
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/FilterAsAlphaRable.java b/sources/org/apache/batik/ext/awt/image/renderable/FilterAsAlphaRable.java
index fd0aabc..855cfcd 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/FilterAsAlphaRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/FilterAsAlphaRable.java
@@ -36,7 +36,7 @@
  * This will take any source Filter and convert it to an alpha channel
  * according the the SVG Mask operation.
  *
- * @author <a href="mailto:Thomas.DeWeese@Kodak.com>Thomas DeWeese</a>
+ * @author <a href="mailto:Thomas.DeWeese@Kodak.com">Thomas DeWeese</a>
  * @version $Id$
  */
 public class FilterAsAlphaRable
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/FilterChainRable.java b/sources/org/apache/batik/ext/awt/image/renderable/FilterChainRable.java
index 9fc4b09..5859990 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/FilterChainRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/FilterChainRable.java
@@ -22,7 +22,7 @@
 /**
  * Implements a filter operation.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public interface FilterChainRable extends Filter {
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/FilterChainRable8Bit.java b/sources/org/apache/batik/ext/awt/image/renderable/FilterChainRable8Bit.java
index 7e95c43..3a16448 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/FilterChainRable8Bit.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/FilterChainRable8Bit.java
@@ -40,7 +40,7 @@
  *      one of the axis, a <tt>AffineRable</tt>
  * </ul>
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public class FilterChainRable8Bit extends AbstractRable
@@ -206,7 +206,7 @@
     
     /**
      * Sets the source to be src.
-     * @param src image to the chain.
+     * @param chainSource image to the chain.
      */
     public void setSource(Filter chainSource) {
         if(chainSource == null){
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/GaussianBlurRable.java b/sources/org/apache/batik/ext/awt/image/renderable/GaussianBlurRable.java
index 96b4e29..58b291c 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/GaussianBlurRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/GaussianBlurRable.java
@@ -21,7 +21,7 @@
  * Implements a GaussianBlur operation, where the blur size is
  * defined by standard deviations along the x and y axis.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public interface GaussianBlurRable extends FilterColorInterpolation {
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/GaussianBlurRable8Bit.java b/sources/org/apache/batik/ext/awt/image/renderable/GaussianBlurRable8Bit.java
index 8d39a74..dfb0bbb 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/GaussianBlurRable8Bit.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/GaussianBlurRable8Bit.java
@@ -35,7 +35,7 @@
 /**
  * GaussianBlurRable implementation
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public class GaussianBlurRable8Bit
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/MorphologyRable.java b/sources/org/apache/batik/ext/awt/image/renderable/MorphologyRable.java
index fee153d..296806d 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/MorphologyRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/MorphologyRable.java
@@ -21,7 +21,7 @@
  * Implements a Morphology operation, where the kernel size is
  * defined by radius along the x and y axis.
  *
- * @author <a href="mailto:sheng.pei@eng.sun.com>Sheng Pei</a>
+ * @author <a href="mailto:sheng.pei@eng.sun.com">Sheng Pei</a>
  * @version $Id$
  */
 public interface MorphologyRable extends Filter {
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/PadRable.java b/sources/org/apache/batik/ext/awt/image/renderable/PadRable.java
index 04207a0..d716858 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/PadRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/PadRable.java
@@ -29,38 +29,38 @@
  * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
  * @version $Id$ */
 public interface PadRable extends Filter {
-      /**
-       * Returns the source to be padded
-       */
+    /**
+     * Returns the source to be padded
+     */
     public Filter getSource();
 
-      /**
-       * Sets the source to be padded
-       * @param src image to offset.
-       */
+    /**
+     * Sets the source to be padded
+     * @param src image to offset.
+     */
     public void setSource(Filter src);
 
-      /**
-       * Set the current rectangle for padding.
-       * @param rect the new rectangle to use for pad.
-       */
+    /**
+     * Set the current rectangle for padding.
+     * @param rect the new rectangle to use for pad.
+     */
     public void setPadRect(Rectangle2D rect);
 
-      /**
-       * Get the current rectangle for padding
-       * @returns Rectangle currently in use for pad.
-       */
+    /**
+     * Get the current rectangle for padding
+     * @return Rectangle currently in use for pad.
+     */
     public Rectangle2D getPadRect();
 
-      /**
-       * Set the current extension mode for pad
-       * @param mode the new pad mode
-       */
+    /**
+     * Set the current extension mode for pad
+     * @param mode the new pad mode
+     */
     public void setPadMode(PadMode mode);
 
-      /**
-       * Get the current extension mode for pad
-       * @returns Mode currently in use for pad
-       */
+    /**
+     * Get the current extension mode for pad
+     * @return Mode currently in use for pad
+     */
     public PadMode getPadMode();
 }
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/PadRable8Bit.java b/sources/org/apache/batik/ext/awt/image/renderable/PadRable8Bit.java
index 207200a..12e09f7 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/PadRable8Bit.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/PadRable8Bit.java
@@ -84,7 +84,7 @@
 
     /**
      * Get the current rectangle for padding
-     * @returns Rectangle currently in use for pad.
+     * @return Rectangle currently in use for pad.
      */
     public Rectangle2D getPadRect() {
         return (Rectangle2D)padRect.clone();
@@ -92,7 +92,7 @@
 
     /**
      * Set the current extension mode for pad
-     * @param mode the new pad mode
+     * @param padMode the new pad mode
      */
     public void setPadMode(PadMode padMode) {
         touch();
@@ -101,7 +101,7 @@
 
     /**
      * Get the current extension mode for pad
-     * @returns Mode currently in use for pad
+     * @return Mode currently in use for pad
      */
     public PadMode getPadMode() {
         return padMode;
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/RedRable.java b/sources/org/apache/batik/ext/awt/image/renderable/RedRable.java
index 0b1779d..e409fe3 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/RedRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/RedRable.java
@@ -33,7 +33,7 @@
  * RasterRable This is used to wrap a Rendered Image back into the
  * RenderableImage world.
  *
- * @author <a href="mailto:Thomas.DeWeese@Kodak.com>Thomas DeWeese</a>
+ * @author <a href="mailto:Thomas.DeWeese@Kodak.com">Thomas DeWeese</a>
  * @version $Id$
  */
 public class RedRable
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/SpecularLightingRable.java b/sources/org/apache/batik/ext/awt/image/renderable/SpecularLightingRable.java
index 2aa9a6d..b88deb2 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/SpecularLightingRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/SpecularLightingRable.java
@@ -25,7 +25,7 @@
  * This filter follows the specification of the feSpecularLighting filter in 
  * the SVG 1.0 specification.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public interface SpecularLightingRable extends FilterColorInterpolation {
@@ -45,7 +45,7 @@
     public Light getLight();
 
     /**
-     * @param New Light object
+     * @param light New Light object
      */
     public void setLight(Light light);
 
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/SpecularLightingRable8Bit.java b/sources/org/apache/batik/ext/awt/image/renderable/SpecularLightingRable8Bit.java
index 4b030d3..7f2c7b6 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/SpecularLightingRable8Bit.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/SpecularLightingRable8Bit.java
@@ -37,7 +37,7 @@
 /**
  * Implementation of the SpecularLightRable interface.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public class SpecularLightingRable8Bit
@@ -133,7 +133,7 @@
     }
 
     /**
-     * @param New Light object
+     * @param light New Light object
      */
     public void setLight(Light light){
         touch();
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/TurbulenceRable.java b/sources/org/apache/batik/ext/awt/image/renderable/TurbulenceRable.java
index 1b94765..43706a1 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/TurbulenceRable.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/TurbulenceRable.java
@@ -29,7 +29,7 @@
 
     /**
      * Sets the turbulence region
-     * @param TurbulenceRable region to fill with turbulence function.
+     * @param turbulenceRegion region to fill with turbulence function.
      */
     public void setTurbulenceRegion(Rectangle2D turbulenceRegion);
 
diff --git a/sources/org/apache/batik/ext/awt/image/renderable/TurbulenceRable8Bit.java b/sources/org/apache/batik/ext/awt/image/renderable/TurbulenceRable8Bit.java
index ddaa32a..8c9d0e5 100644
--- a/sources/org/apache/batik/ext/awt/image/renderable/TurbulenceRable8Bit.java
+++ b/sources/org/apache/batik/ext/awt/image/renderable/TurbulenceRable8Bit.java
@@ -136,7 +136,7 @@
 
     /**
      * Sets the turbulence region
-     * @param TurbulenceRegion region to fill with turbulence function.
+     * @param turbulenceRegion region to fill with turbulence function.
      */
     public void setTurbulenceRegion(Rectangle2D turbulenceRegion) {
         touch();
diff --git a/sources/org/apache/batik/ext/awt/image/rendered/AbstractRed.java b/sources/org/apache/batik/ext/awt/image/rendered/AbstractRed.java
index ff31f50..f556bfe 100644
--- a/sources/org/apache/batik/ext/awt/image/rendered/AbstractRed.java
+++ b/sources/org/apache/batik/ext/awt/image/rendered/AbstractRed.java
@@ -141,9 +141,9 @@
     /**
      * Construct an Abstract Rable from a bounds rect and props
      * (may be null).  The srcs Vector will be empty.
-     * @param srcs This is used to initialize the srcs Vector.  All
-     * the members of srcs must be Filter otherwise an error
-     * will be thrown.
+     * @param src will be the first (and only) member of the srcs
+     * Vector. Src is also used to set the ColorModel, SampleModel,
+     * and tile grid offsets.
      * @param bounds this defines the extent of the rable in the
      * user coordinate system.
      * @param cm The ColorModel to use. If null it will default to
@@ -523,8 +523,8 @@
     }
 
     /**
-     * Returns the x index of tile under xloc
-     * @param  yloc the x location (in pixels) to get tile for.
+     * Returns the x index of tile under xloc.
+     * @param  xloc the x location (in pixels) to get tile for.
      * @return The tile index under xloc (may be outside tile grid).
      */
     public final int getXTile(int xloc) {
@@ -537,7 +537,7 @@
     }
 
     /**
-     * Returns the y index of tile under yloc
+     * Returns the y index of tile under yloc.
      * @param  yloc the y location (in pixels) to get tile for.
      * @return The tile index under yloc (may be outside tile grid).
      */
diff --git a/sources/org/apache/batik/ext/awt/image/rendered/AbstractTiledRed.java b/sources/org/apache/batik/ext/awt/image/rendered/AbstractTiledRed.java
index 8abee49..594190f 100644
--- a/sources/org/apache/batik/ext/awt/image/rendered/AbstractTiledRed.java
+++ b/sources/org/apache/batik/ext/awt/image/rendered/AbstractTiledRed.java
@@ -113,9 +113,9 @@
     /**
      * Construct an Abstract Rable from a bounds rect and props
      * (may be null).  The srcs Vector will be empty.
-     * @param srcs This is used to initialize the srcs Vector.  All
-     * the members of srcs must be Filter otherwise an error
-     * will be thrown.
+     * @param src will be the first (and only) member of the srcs
+     * Vector. Src is also used to set the ColorModel, SampleModel,
+     * and tile grid offsets.
      * @param bounds this defines the extent of the rable in the
      * user coordinate system.
      * @param cm The ColorModel to use. If null it will default to
@@ -180,7 +180,7 @@
      *               and is the size of the whole image.
      * @param tileGridXOff The x location of tile 0,0.
      * @param tileGridYOff The y location of tile 0,0.
-     * @param tileStore The tileStore to use (or null).
+     * @param tiles  The tileStore to use (or null).
      * @param props  Any properties you want to associate with the image.
      */
     protected void init(CachableRed src, Rectangle   bounds,
diff --git a/sources/org/apache/batik/ext/awt/image/rendered/BumpMap.java b/sources/org/apache/batik/ext/awt/image/rendered/BumpMap.java
index 70fd906..fde9179 100644
--- a/sources/org/apache/batik/ext/awt/image/rendered/BumpMap.java
+++ b/sources/org/apache/batik/ext/awt/image/rendered/BumpMap.java
@@ -26,7 +26,7 @@
 /**
  * Default BumpMap implementation.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public final class BumpMap {
diff --git a/sources/org/apache/batik/ext/awt/image/rendered/DisplacementMapRed.java b/sources/org/apache/batik/ext/awt/image/rendered/DisplacementMapRed.java
index 899ad82..333e5f7 100644
--- a/sources/org/apache/batik/ext/awt/image/rendered/DisplacementMapRed.java
+++ b/sources/org/apache/batik/ext/awt/image/rendered/DisplacementMapRed.java
@@ -114,16 +114,16 @@
     }
 
     /**
+     * @param image the image to distort
+     * @param offsets the displacement map
+     * @param xChannel defines the channel of off whose values will be
+     *                 on X-axis operation
+     * @param yChannel defines the channel of off whose values will be
      * @param scaleX defines the scale factor of the filter operation
      *               on the X axis.
      * @param scaleY defines the scale factor of the filter operation
      *               on the Y axis
-     * @param xChannel defines the channel of off whose values will be
-     *                 on X-axis operation
-     * @param xChannel defines the channel of off whose values will be
-     *                 on X-axis operation
-     * @param off defines the input bufferedImage whose component
-     *            values will be used in displacment operation 
+     * @param rh the rendering hints
      */
     public DisplacementMapRed(CachableRed image, 
                               CachableRed offsets,
@@ -650,7 +650,7 @@
     /**
      * Does displacement map using Nearest neighbor interpolation
      *
-     * @param img the Raster to be filtered
+     * @param off the displacement map
      * @param dst stores the filtered image. If null, a destination will
      *        be created. img and dst can refer to the same Raster, in
      *        which situation the img will be modified.
diff --git a/sources/org/apache/batik/ext/awt/image/spi/ErrorConstants.java b/sources/org/apache/batik/ext/awt/image/spi/ErrorConstants.java
index e0045ad..5197380 100644
--- a/sources/org/apache/batik/ext/awt/image/spi/ErrorConstants.java
+++ b/sources/org/apache/batik/ext/awt/image/spi/ErrorConstants.java
@@ -41,7 +41,9 @@
     /**
      * The error code when a url of a particular format is unreadable 
      * (corrupt).
+     * <pre>
      * {0} = the format that couldn't be read.
+     * </pre>
      */
     public static final String ERR_STREAM_FORMAT_UNREADABLE
         = "stream.format.unreadable";
@@ -49,7 +51,9 @@
     /**
      * The error code when the data in the  url is uninterpretable by this
      * software (meaning it's corrupt or an unsupported format of some sort).
+     * <pre>
      * {0} = the ParsedURL that couldn't be read.
+     * </pre>
      */
     public static final String ERR_URL_UNINTERPRETABLE
         = "url.uninterpretable";
@@ -57,7 +61,9 @@
     /**
      * The error code when a url is unreachable (ussually bad URL,
      * or server is down).
+     * <pre>
      * {0} = the ParsedURL that couldn't be read.
+     * </pre>
      */
     public static final String ERR_URL_UNREACHABLE
         = "url.unreachable";
@@ -66,8 +72,10 @@
     /**
      * The error code when a url of a particular format is unreadable 
      * (corrupt).
+     * <pre>
      * {0} = the format that couldn't be read.
      * {1} = the ParsedURL for file.
+     * </pre>
      */
     public static final String ERR_URL_FORMAT_UNREADABLE
         = "url.format.unreadable";
diff --git a/sources/org/apache/batik/ext/awt/image/spi/JDKRegistryEntry.java b/sources/org/apache/batik/ext/awt/image/spi/JDKRegistryEntry.java
index 7dcccb9..d232f5d 100644
--- a/sources/org/apache/batik/ext/awt/image/spi/JDKRegistryEntry.java
+++ b/sources/org/apache/batik/ext/awt/image/spi/JDKRegistryEntry.java
@@ -79,7 +79,7 @@
     /**
      * Decode the URL into a RenderableImage
      *
-     * @param is The input stream that contains the image.
+     * @param purl URL of the image.
      * @param needRawData If true the image returned should not have
      *                    any default color correction the file may 
      *                    specify applied.  
diff --git a/sources/org/apache/batik/ext/awt/image/spi/JPEGRegistryEntry.java b/sources/org/apache/batik/ext/awt/image/spi/JPEGRegistryEntry.java
index 4953e45..f67024c 100644
--- a/sources/org/apache/batik/ext/awt/image/spi/JPEGRegistryEntry.java
+++ b/sources/org/apache/batik/ext/awt/image/spi/JPEGRegistryEntry.java
@@ -55,7 +55,7 @@
     /**
      * Decode the Stream into a RenderableImage
      *
-     * @param is The input stream that contains the image.
+     * @param inIS The input stream that contains the image.
      * @param origURL The original URL, if any, for documentation
      *                purposes only.  This may be null.
      * @param needRawData If true the image returned should not have
diff --git a/sources/org/apache/batik/ext/awt/image/spi/PNGRegistryEntry.java b/sources/org/apache/batik/ext/awt/image/spi/PNGRegistryEntry.java
index 8638f2c..794de3b 100644
--- a/sources/org/apache/batik/ext/awt/image/spi/PNGRegistryEntry.java
+++ b/sources/org/apache/batik/ext/awt/image/spi/PNGRegistryEntry.java
@@ -48,7 +48,7 @@
     /**
      * Decode the Stream into a RenderableImage
      *
-     * @param is The input stream that contains the image.
+     * @param inIS The input stream that contains the image.
      * @param origURL The original URL, if any, for documentation
      *                purposes only.  This may be null.
      * @param needRawData If true the image returned should not have
diff --git a/sources/org/apache/batik/ext/awt/image/spi/TIFFRegistryEntry.java b/sources/org/apache/batik/ext/awt/image/spi/TIFFRegistryEntry.java
index b7bd3f5..ecd4f35 100644
--- a/sources/org/apache/batik/ext/awt/image/spi/TIFFRegistryEntry.java
+++ b/sources/org/apache/batik/ext/awt/image/spi/TIFFRegistryEntry.java
@@ -50,7 +50,7 @@
     /**
      * Decode the Stream into a RenderableImage
      *
-     * @param is The input stream that contains the image.
+     * @param inIS The input stream that contains the image.
      * @param origURL The original URL, if any, for documentation
      *                purposes only.  This may be null.
      * @param needRawData If true the image returned should not have
diff --git a/sources/org/apache/batik/ext/swing/DoubleDocument.java b/sources/org/apache/batik/ext/swing/DoubleDocument.java
index 0311426..12a38e2 100644
--- a/sources/org/apache/batik/ext/swing/DoubleDocument.java
+++ b/sources/org/apache/batik/ext/swing/DoubleDocument.java
@@ -14,7 +14,8 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
- */package org.apache.batik.ext.swing;
+ */
+package org.apache.batik.ext.swing;
 
 import javax.swing.text.AttributeSet;
 import javax.swing.text.BadLocationException;
@@ -27,11 +28,14 @@
  * @version $Id$
  */
 public class DoubleDocument extends PlainDocument {
+
     /** 
-     * Strip all non digit characters. '-' and '+' are only allowed as the
-     * first character. Only one '.' is allowed.
-     **/
-    public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { 
+     * Strip all non digit characters.  The first character must be '-' or '+'.
+     * Only one '.' is allowed.
+     */
+    public void insertString(int offs, String str, AttributeSet a)
+            throws BadLocationException { 
+
         if (str == null) {
             return;
         }
diff --git a/sources/org/apache/batik/ext/swing/JGridBagPanel.java b/sources/org/apache/batik/ext/swing/JGridBagPanel.java
index c36ec73..9785a04 100644
--- a/sources/org/apache/batik/ext/swing/JGridBagPanel.java
+++ b/sources/org/apache/batik/ext/swing/JGridBagPanel.java
@@ -27,7 +27,7 @@
 /**
  * An implementation of JPanel that uses the GridBagLayout.
  * 
- * @author  <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author  <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 
diff --git a/sources/org/apache/batik/extension/svg/BatikDomExtension.java b/sources/org/apache/batik/extension/svg/BatikDomExtension.java
index 6b3be9c..6a0a4ff 100644
--- a/sources/org/apache/batik/extension/svg/BatikDomExtension.java
+++ b/sources/org/apache/batik/extension/svg/BatikDomExtension.java
@@ -80,7 +80,8 @@
      * be necessary to replace existing tag handlers, although this
      * is discouraged.
      *
-     * @param ctx The DomContext instance to be updated
+     * @param di The ExtensibleDOMImplementation to register the
+     *           extension elements with.
      */
     public void registerTags(ExtensibleDOMImplementation di) {
         di.registerCustomElementFactory
diff --git a/sources/org/apache/batik/extension/svg/BatikFlowTextElementBridge.java b/sources/org/apache/batik/extension/svg/BatikFlowTextElementBridge.java
index bf08928..e7dbda3 100644
--- a/sources/org/apache/batik/extension/svg/BatikFlowTextElementBridge.java
+++ b/sources/org/apache/batik/extension/svg/BatikFlowTextElementBridge.java
@@ -53,7 +53,7 @@
 /**
  * Bridge class for the &lt;flowText> element.
  *
- * @author <a href="deweese@apache.org">Thomas DeWeese</a>
+ * @author <a href="mailto:deweese@apache.org">Thomas DeWeese</a>
  * @version $Id$
  */
 public class BatikFlowTextElementBridge extends SVGTextElementBridge 
diff --git a/sources/org/apache/batik/extension/svg/FlowExtGlyphLayout.java b/sources/org/apache/batik/extension/svg/FlowExtGlyphLayout.java
index aede225..cda824c 100644
--- a/sources/org/apache/batik/extension/svg/FlowExtGlyphLayout.java
+++ b/sources/org/apache/batik/extension/svg/FlowExtGlyphLayout.java
@@ -34,11 +34,9 @@
 import org.apache.batik.gvt.TextNode;
 
 /**
- * One line Class Desc
+ * A GlyphLayout class for SVG 1.2 flowing text.
  *
- * Complete Class Desc
- *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class FlowExtGlyphLayout extends GlyphLayout {
@@ -501,10 +499,9 @@
      * over space in the flow rect and scaling that value by 1.0 to
      * align to the bottom, 0.5 for middle and 0.0 for top.
      *
-     * @param verticalAlignOffset the {@link java.awt.geom.Point2D.Float} object that 
-     *                            is storing the alignment offset.
-     * @param currentRegion the {@link RegionInfo} object that we 
-     *                      are rendering into.
+     * @param verticalAlignOffset the {@link java.awt.geom.Point2D.Float}
+     *        object that is storing the alignment offset.
+     * @param region the {@link RegionInfo} object that we are rendering into.
      * @param maxDescent the very lowest point this line reaches.
      */
     public static void updateVerticalAlignOffset
diff --git a/sources/org/apache/batik/extension/svg/FlowExtTextLayoutFactory.java b/sources/org/apache/batik/extension/svg/FlowExtTextLayoutFactory.java
index ba0cef5..06ef952 100644
--- a/sources/org/apache/batik/extension/svg/FlowExtTextLayoutFactory.java
+++ b/sources/org/apache/batik/extension/svg/FlowExtTextLayoutFactory.java
@@ -28,7 +28,7 @@
  * FlowRoot instances.
  *
  * @see org.apache.batik.gvt.text.TextSpanLayout
- * @author <a href="dewese@apache.org">Thomas DeWeese</a>
+ * @author <a href="mailto:dewese@apache.org">Thomas DeWeese</a>
  * @version $Id$
  */
 public class FlowExtTextLayoutFactory implements TextLayoutFactory {
diff --git a/sources/org/apache/batik/extension/svg/FlowExtTextNode.java b/sources/org/apache/batik/extension/svg/FlowExtTextNode.java
index 1bb714f..6b8d5e7 100644
--- a/sources/org/apache/batik/extension/svg/FlowExtTextNode.java
+++ b/sources/org/apache/batik/extension/svg/FlowExtTextNode.java
@@ -29,7 +29,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class FlowExtTextNode extends TextNode{
diff --git a/sources/org/apache/batik/extension/svg/FlowExtTextPainter.java b/sources/org/apache/batik/extension/svg/FlowExtTextPainter.java
index 016981a..526ce98 100644
--- a/sources/org/apache/batik/extension/svg/FlowExtTextPainter.java
+++ b/sources/org/apache/batik/extension/svg/FlowExtTextPainter.java
@@ -32,7 +32,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class FlowExtTextPainter extends StrokingTextPainter {
diff --git a/sources/org/apache/batik/gvt/AbstractGraphicsNode.java b/sources/org/apache/batik/gvt/AbstractGraphicsNode.java
index 6a8442d..c20f084 100644
--- a/sources/org/apache/batik/gvt/AbstractGraphicsNode.java
+++ b/sources/org/apache/batik/gvt/AbstractGraphicsNode.java
@@ -219,7 +219,7 @@
     }
 
     /**
-     * Returns the concatenated transform of this node. i.e., this
+     * Returns the concatenated transform of this node. That is, this
      * node's transform preconcatenated with it's parent's transforms.
      */
     public AffineTransform getGlobalTransform(){
@@ -237,7 +237,7 @@
     /**
      * Sets the composite of this node.
      *
-     * @param composite the composite of this node
+     * @param newComposite the composite of this node
      */
     public void setComposite(Composite newComposite) {
         fireGraphicsNodeChangeStarted();
@@ -832,7 +832,7 @@
 
     /**
      * Returns the bounds of the area covered by this node, without
-     * taking any of its rendering attribute into accoun. i.e.,
+     * taking any of its rendering attribute into accoun. That is,
      * exclusive of any clipping, masking, filtering or stroking, for
      * example. The returned value is transformed by the concatenation
      * of the input transform and this node's transform.
diff --git a/sources/org/apache/batik/gvt/CompositeGraphicsNode.java b/sources/org/apache/batik/gvt/CompositeGraphicsNode.java
index 1d224d6..dc72906 100644
--- a/sources/org/apache/batik/gvt/CompositeGraphicsNode.java
+++ b/sources/org/apache/batik/gvt/CompositeGraphicsNode.java
@@ -196,7 +196,14 @@
         Rectangle2D bounds = null;
         while ((bounds == null) && i < count) {
             bounds = children[i++].getTransformedBounds(IDENTITY);
+            if (((i & 0x0F) == 0) && HaltingThread.hasBeenHalted())
+                break; // check every 16 children if we have been interrupted.
         }
+        if (HaltingThread.hasBeenHalted()) {
+            invalidateGeometryCache();
+            return null;
+        }
+
         if (bounds == null) {
             primitiveBounds = NULL_RECT;
             return null;
@@ -215,6 +222,9 @@
                     primitiveBounds.add(ctb);
                 }
             }
+
+            if (((i & 0x0F) == 0) && HaltingThread.hasBeenHalted())
+                break; // check every 16 children if we have been interrupted.
         }
         
         // Check If we should halt early.
@@ -294,13 +304,13 @@
 
     /**
      * Returns the bounds of the area covered by this node, without
-     * taking any of its rendering attribute into account. i.e.,
+     * taking any of its rendering attribute into account. That is,
      * exclusive of any clipping, masking, filtering or stroking, for
      * example.
      */
     public Rectangle2D getGeometryBounds() {
         if (geometryBounds == null) {
-            // System.out.println("geometryBounds are null");
+            // System.err.println("geometryBounds are null");
             int i=0;
             while(geometryBounds == null && i < count){
                 geometryBounds = 
@@ -327,7 +337,7 @@
 
     /**
      * Returns the bounds of the area covered by this node, without taking any
-     * of its rendering attribute into accoun. i.e., exclusive of any clipping,
+     * of its rendering attribute into accoun. That is, exclusive of any clipping,
      * masking, filtering or stroking, for example. The returned value is
      * transformed by the concatenation of the input transform and this node's
      * transform.
diff --git a/sources/org/apache/batik/gvt/GraphicsNode.java b/sources/org/apache/batik/gvt/GraphicsNode.java
index d6c5d85..2a0e541 100644
--- a/sources/org/apache/batik/gvt/GraphicsNode.java
+++ b/sources/org/apache/batik/gvt/GraphicsNode.java
@@ -144,7 +144,7 @@
     AffineTransform getInverseTransform();
 
     /**
-     * Returns the concatenated transform of this node. i.e., this
+     * Returns the concatenated transform of this node. That is, this
      * node's transform preconcatenated with it's parent's transforms.
      */
     AffineTransform getGlobalTransform();
@@ -152,7 +152,7 @@
     /**
      * Sets the composite of this node.
      *
-     * @param composite the composite of this node
+     * @param newComposite the composite of this node
      */
     void setComposite(Composite newComposite);
 
@@ -388,7 +388,7 @@
 
     /**
      * Returns the bounds of the area covered by this node, without
-     * taking any of its rendering attribute into account. i.e.,
+     * taking any of its rendering attribute into account. That is,
      * exclusive of any clipping, masking, filtering or stroking, for
      * example.
      */
@@ -396,7 +396,7 @@
 
     /**
      * Returns the bounds of the area covered by this node, without
-     * taking any of its rendering attribute into accoun. i.e.,
+     * taking any of its rendering attribute into accoun. That is,
      * exclusive of any clipping, masking, filtering or stroking, for
      * example. The returned value is transformed by the concatenation
      * of the input transform and this node's transform.
diff --git a/sources/org/apache/batik/gvt/MarkerShapePainter.java b/sources/org/apache/batik/gvt/MarkerShapePainter.java
index 8827761..7b740b6 100644
--- a/sources/org/apache/batik/gvt/MarkerShapePainter.java
+++ b/sources/org/apache/batik/gvt/MarkerShapePainter.java
@@ -35,7 +35,7 @@
 /**
  * A shape painter that can be used to paint markers on a shape.
  *
- * @author <a href="vincent.hardy@eng.sun.com">Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public class MarkerShapePainter implements ShapePainter {
@@ -111,7 +111,6 @@
     /**
      * Paints the specified shape using the specified Graphics2D.
      *
-     * @param shape the shape to paint
      * @param g2d the Graphics2D to use
      */
      public void paint(Graphics2D g2d) {
diff --git a/sources/org/apache/batik/gvt/PatternPaintContext.java b/sources/org/apache/batik/gvt/PatternPaintContext.java
index 320ec52..4ce465a 100644
--- a/sources/org/apache/batik/gvt/PatternPaintContext.java
+++ b/sources/org/apache/batik/gvt/PatternPaintContext.java
@@ -40,7 +40,7 @@
  * <tt>PaintContext</tt> for the <tt>ConcretePatterPaint</tt>
  * paint implementation.
  *
- * @author <a href="vincent.hardy@eng.sun.com">Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public class PatternPaintContext implements PaintContext {
diff --git a/sources/org/apache/batik/gvt/ProxyGraphicsNode.java b/sources/org/apache/batik/gvt/ProxyGraphicsNode.java
index 7c2bbef..ea353c6 100644
--- a/sources/org/apache/batik/gvt/ProxyGraphicsNode.java
+++ b/sources/org/apache/batik/gvt/ProxyGraphicsNode.java
@@ -100,7 +100,7 @@
 
     /**
      * Returns the bounds of the area covered by this node, without
-     * taking any of its rendering attribute into account. i.e.,
+     * taking any of its rendering attribute into account. That is,
      * exclusive of any clipping, masking, filtering or stroking, for
      * example.
      */
diff --git a/sources/org/apache/batik/gvt/RasterImageNode.java b/sources/org/apache/batik/gvt/RasterImageNode.java
index d12fb6c..5fb9bc5 100644
--- a/sources/org/apache/batik/gvt/RasterImageNode.java
+++ b/sources/org/apache/batik/gvt/RasterImageNode.java
@@ -28,7 +28,7 @@
  * A graphics node that represents a raster image.
  *
  * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @author <a href="mailto:Thomas.DeWeese@Kodak.com>Thomas DeWeese</a>
+ * @author <a href="mailto:Thomas.DeWeese@Kodak.com">Thomas DeWeese</a>
  * @version $Id$
  */
 public class RasterImageNode extends AbstractGraphicsNode {
@@ -118,7 +118,7 @@
 
     /**
      * Returns the bounds of the area covered by this node, without taking any
-     * of its rendering attribute into account. i.e., exclusive of any clipping,
+     * of its rendering attribute into account. That is, exclusive of any clipping,
      * masking, filtering or stroking, for example.
      */
     public Rectangle2D getGeometryBounds() {
diff --git a/sources/org/apache/batik/gvt/Selectable.java b/sources/org/apache/batik/gvt/Selectable.java
index 6c5a0c6..2e99c8d 100644
--- a/sources/org/apache/batik/gvt/Selectable.java
+++ b/sources/org/apache/batik/gvt/Selectable.java
@@ -23,7 +23,7 @@
  * Interface describing object that can be selected or have selections
  * made on it.
  *
- * @author <a href="bill.haneman@ireland.sun.com">Bill Haneman</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
  * @version $Id$
  */
 public interface Selectable {
diff --git a/sources/org/apache/batik/gvt/ShapeNode.java b/sources/org/apache/batik/gvt/ShapeNode.java
index d8ba140..e07a639 100644
--- a/sources/org/apache/batik/gvt/ShapeNode.java
+++ b/sources/org/apache/batik/gvt/ShapeNode.java
@@ -418,7 +418,7 @@
 
     /**
      * Returns the bounds of the area covered by this node, without
-     * taking any of its rendering attribute into account. i.e.,
+     * taking any of its rendering attribute into account. That is,
      * exclusive of any clipping, masking, filtering or stroking, for
      * example.
      */
diff --git a/sources/org/apache/batik/gvt/TextNode.java b/sources/org/apache/batik/gvt/TextNode.java
index c1277be..93c49e0 100644
--- a/sources/org/apache/batik/gvt/TextNode.java
+++ b/sources/org/apache/batik/gvt/TextNode.java
@@ -243,7 +243,7 @@
 
     /**
      * Returns the bounds of the area covered by this node, without
-     * taking any of its rendering attribute into account. i.e.,
+     * taking any of its rendering attribute into account. That is,
      * exclusive of any clipping, masking, filtering or stroking, for
      * example.
      */
@@ -300,8 +300,8 @@
 
     /**
      * Initializes the current selection to begin with the character at (x, y).
-     *
-     * @param the anchor of this node
+     * @param x the x coordinate of the start of the selection
+     * @param y the y coordinate of the start of the selection
      */
     public boolean selectAt(double x, double y) {
         beginMark = textPainter.selectAt(x, y, this);
@@ -309,9 +309,9 @@
     }
 
     /**
-     * Extends the current selection to the character at (x, y)..
-     *
-     * @param the anchor of this node
+     * Extends the current selection to the character at (x, y).
+     * @param x the x coordinate of the end of the selection
+     * @param y the y coordinate of the end of the selection
      */
     public boolean selectTo(double x, double y) {
         Mark tmpMark = textPainter.selectTo(x, y, beginMark);
@@ -325,9 +325,9 @@
     }
 
     /**
-     * Selects all the text in this TextNode...
-     *
-     * @param the anchor of this node
+     * Selects all the text in this TextNode.  The coordinates are ignored.
+     * @param x the x coordinate of the point the selection was made
+     * @param y the y coordinate of the point the selection was made
      */
     public boolean selectAll(double x, double y) {
         beginMark = textPainter.selectFirst(this);
diff --git a/sources/org/apache/batik/gvt/TextPainter.java b/sources/org/apache/batik/gvt/TextPainter.java
index c8ccd6e..4f24b4d 100644
--- a/sources/org/apache/batik/gvt/TextPainter.java
+++ b/sources/org/apache/batik/gvt/TextPainter.java
@@ -37,7 +37,6 @@
      *
      * @param node the TextNode to paint
      * @param g2d the Graphics2D to use
-     * @param context the rendering context.
      */
     void paint(TextNode node, Graphics2D g2d);
 
diff --git a/sources/org/apache/batik/gvt/UpdateTracker.java b/sources/org/apache/batik/gvt/UpdateTracker.java
index 25b3f41..3b20695 100644
--- a/sources/org/apache/batik/gvt/UpdateTracker.java
+++ b/sources/org/apache/batik/gvt/UpdateTracker.java
@@ -212,7 +212,7 @@
 
     /**
      * Recieves notification of a change to a GraphicsNode.
-     * @param gn The graphics node that is changing.
+     * @param gnce The event object describing the GraphicsNode change.
      */
     public void changeStarted(GraphicsNodeChangeEvent gnce) {
         // System.out.println("A node has changed for: " + this);
diff --git a/sources/org/apache/batik/gvt/event/AbstractAWTEventDispatcher.java b/sources/org/apache/batik/gvt/event/AbstractAWTEventDispatcher.java
index 3f47fea..d0d5607 100644
--- a/sources/org/apache/batik/gvt/event/AbstractAWTEventDispatcher.java
+++ b/sources/org/apache/batik/gvt/event/AbstractAWTEventDispatcher.java
@@ -49,9 +49,9 @@
  * This class is made abstract so that concrete versions can be made
  * for different JDK versions.
  *
- * @author <a href="bill.haneman@ireland.sun.com">Bill Haneman</a>
- * @author <a href="cjolif@ilog.fr">Christophe Jolif</a>
- * @author <a href="tkormann@ilog.fr">Thierry Kormann</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
+ * @author <a href="mailto:cjolif@ilog.fr">Christophe Jolif</a>
+ * @author <a href="mailto:tkormann@ilog.fr">Thierry Kormann</a>
  * @version $Id$
  */
 public abstract class AbstractAWTEventDispatcher
@@ -82,7 +82,7 @@
     protected GraphicsNode lastHit;
 
     /**
-     * A dummy graphics node to dispacth "deselect" mouse events to. ie.
+     * A dummy graphics node to dispatch "deselect" mouse events to. That is,
      * when the mouse is clicked outside any nodes.
      */
     protected GraphicsNode dummyNode = new TextNode();
@@ -527,10 +527,9 @@
             // node.processMouseEvent(gvtevt);
             processMouseEvent(gvtevt);
 
-        } else if (node == null && evt.getID() == MouseEvent.MOUSE_CLICKED
-              && evt.getClickCount() == 1) {
+        } else {
             // this is a deselect event, dispatch it to dummy node
-            gvtevt = new GraphicsNodeMouseEvent(dummyNode,
+            gvtevt = new GraphicsNodeMouseEvent(root,
                                                 evt.getID(),
                                                 evt.getWhen(),
                                                 evt.getModifiers(),
@@ -698,5 +697,3 @@
 
     }
 }
-
-
diff --git a/sources/org/apache/batik/gvt/event/EventDispatcher.java b/sources/org/apache/batik/gvt/event/EventDispatcher.java
index 67c9f87..1f02e44 100644
--- a/sources/org/apache/batik/gvt/event/EventDispatcher.java
+++ b/sources/org/apache/batik/gvt/event/EventDispatcher.java
@@ -32,8 +32,8 @@
  * for containment are performed from the EventDispatcher's "root"
  * node.</p>
  *
- * @author <a href="bill.haneman@ireland.sun.com">Bill Haneman</a>
- * @author <a href="tkormann@ilog.fr">Thierry Kormann</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
+ * @author <a href="mailto:tkormann@ilog.fr">Thierry Kormann</a>
  * @version $Id$ */
 public interface EventDispatcher {
 
diff --git a/sources/org/apache/batik/gvt/event/GraphicsNodeChangeAdapter.java b/sources/org/apache/batik/gvt/event/GraphicsNodeChangeAdapter.java
index 2d9cbb8..c34503e 100644
--- a/sources/org/apache/batik/gvt/event/GraphicsNodeChangeAdapter.java
+++ b/sources/org/apache/batik/gvt/event/GraphicsNodeChangeAdapter.java
@@ -38,13 +38,13 @@
     /**
      * Invoked when a change has started on a graphics node, but before
      * any changes occure in the graphics node it's self.
-     * @param evt the graphics node change event
+     * @param gnce the graphics node change event
      */
-    public void changeStarted  (GraphicsNodeChangeEvent gnce) { }
+    public void changeStarted(GraphicsNodeChangeEvent gnce) { }
 
     /**
      * Invoked when a change on a graphics node has completed
-     * @param evt the graphics node change event
+     * @param gnce the graphics node change event
      */
     public void changeCompleted(GraphicsNodeChangeEvent gnce) { }
 }
diff --git a/sources/org/apache/batik/gvt/event/GraphicsNodeChangeListener.java b/sources/org/apache/batik/gvt/event/GraphicsNodeChangeListener.java
index bd3e08f..cc440b2 100644
--- a/sources/org/apache/batik/gvt/event/GraphicsNodeChangeListener.java
+++ b/sources/org/apache/batik/gvt/event/GraphicsNodeChangeListener.java
@@ -30,13 +30,13 @@
     /**
      * Invoked when a change has started on a graphics node, but before
      * any changes occure in the graphics node it's self.
-     * @param evt the graphics node change event
+     * @param gnce the graphics node change event
      */
-    void changeStarted  (GraphicsNodeChangeEvent gnce);
+    void changeStarted(GraphicsNodeChangeEvent gnce);
 
     /**
      * Invoked when a change on a graphics node has completed
-     * @param evt the graphics node change event
+     * @param gnce the graphics node change event
      */
     void changeCompleted(GraphicsNodeChangeEvent gnce);
 }
diff --git a/sources/org/apache/batik/gvt/event/GraphicsNodeMouseEvent.java b/sources/org/apache/batik/gvt/event/GraphicsNodeMouseEvent.java
index 5cd9c8b..553042c 100644
--- a/sources/org/apache/batik/gvt/event/GraphicsNodeMouseEvent.java
+++ b/sources/org/apache/batik/gvt/event/GraphicsNodeMouseEvent.java
@@ -26,7 +26,7 @@
 /**
  * An event which indicates that a mouse action occurred in a graphics node.
  *
- * @author <a href="cjolif@ilog.fr">Christophe Jolif</a>
+ * @author <a href="mailto:cjolif@ilog.fr">Christophe Jolif</a>
  * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
  * @version $Id$
  */
@@ -118,8 +118,10 @@
      * @param id the id of this event
      * @param when the time the event occurred
      * @param modifiers the modifier keys down while event occurred
-     * @param x,&nbsp;y the mouse coordinates
-     * @param screenX,&nbsp;screenY the mouse coordinates relative to the screen
+     * @param x the mouse x coordinate
+     * @param y the mouse y coordinate
+     * @param screenX the mouse x coordinate relative to the screen
+     * @param screenY the mouse y coordinate relative to the screen
      * @param clickCount the number of clicks
      * @param relatedNode the related node
      * @see #getRelatedNode
diff --git a/sources/org/apache/batik/gvt/event/SelectionAdapter.java b/sources/org/apache/batik/gvt/event/SelectionAdapter.java
new file mode 100644
index 0000000..fa05cd3
--- /dev/null
+++ b/sources/org/apache/batik/gvt/event/SelectionAdapter.java
@@ -0,0 +1,54 @@
+/*
+
+   Copyright 2005 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.
+   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.batik.gvt.event;
+
+/**
+ * Adapter for the listener interface for receiving selection events.
+ *
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
+ * @version $Id$
+ */
+public class SelectionAdapter implements SelectionListener {
+    /**
+     * Invoked when a selection has changed.
+     * @param evt the selection change event
+     */
+    public void selectionChanged(SelectionEvent evt) { }
+
+    /**
+     * Invoked when a selection is done.
+     * @param evt the selection change event
+     */
+    public void selectionDone(SelectionEvent evt) { }
+
+    /**
+     * Invoked when a selection is cleared.
+     * @param evt the selection change event
+     */
+    public void selectionCleared(SelectionEvent evt) { }
+
+    /**
+     * Invoked when a selection started.
+     * @param evt the selection change event
+     */
+    public void selectionStarted(SelectionEvent evt) { }
+};
+
+
+
diff --git a/sources/org/apache/batik/gvt/filter/Mask.java b/sources/org/apache/batik/gvt/filter/Mask.java
index 706a33b..8f27e9d 100644
--- a/sources/org/apache/batik/gvt/filter/Mask.java
+++ b/sources/org/apache/batik/gvt/filter/Mask.java
@@ -48,7 +48,7 @@
     
     /**
      * This returns the current image being masked by the mask node.
-     * @returns The image to mask
+     * @return The image to mask
      */
     public Filter getSource();
     
diff --git a/sources/org/apache/batik/gvt/filter/MaskRable8Bit.java b/sources/org/apache/batik/gvt/filter/MaskRable8Bit.java
index 54c3681..8857616 100644
--- a/sources/org/apache/batik/gvt/filter/MaskRable8Bit.java
+++ b/sources/org/apache/batik/gvt/filter/MaskRable8Bit.java
@@ -36,7 +36,7 @@
 /**
  * MaskRable implementation
  *
- * @author <a href="mailto:Thomas.DeWeese@Kodak.com>Thomas DeWeese</a>
+ * @author <a href="mailto:Thomas.DeWeese@Kodak.com">Thomas DeWeese</a>
  * @version $Id$
  */
 public class MaskRable8Bit
@@ -70,7 +70,7 @@
 
     /**
      * This returns the current image being masked by the mask node.
-     * @returns The image to mask
+     * @return The image to mask
      */
     public Filter getSource() {
         return (Filter)getSources().get(0);
@@ -101,7 +101,7 @@
      * rgb to luminance conversion.
      * In the case of an rgb only image, just the rgb to luminance
      * conversion is performed.
-     * @param gn The graphics node that defines the mask image.
+     * @param mask The graphics node that defines the mask image.
      */
     public void setMaskNode(GraphicsNode mask) {
         touch();
diff --git a/sources/org/apache/batik/gvt/flow/FlowGlyphLayout.java b/sources/org/apache/batik/gvt/flow/FlowGlyphLayout.java
index 6169f9a..e3cfb4a 100644
--- a/sources/org/apache/batik/gvt/flow/FlowGlyphLayout.java
+++ b/sources/org/apache/batik/gvt/flow/FlowGlyphLayout.java
@@ -38,7 +38,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class FlowGlyphLayout extends GlyphLayout {
diff --git a/sources/org/apache/batik/gvt/flow/FlowRegions.java b/sources/org/apache/batik/gvt/flow/FlowRegions.java
index 684e640..4f15a7a 100644
--- a/sources/org/apache/batik/gvt/flow/FlowRegions.java
+++ b/sources/org/apache/batik/gvt/flow/FlowRegions.java
@@ -1,11 +1,20 @@
-/**************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.     *
- * ---------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software      *
- * License version 1.1, a copy of which has been included with this       *
- * distribution in the LICENSE file.                                      *
- **************************************************************************/
+/*
 
+   Copyright 2003 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.
+   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.batik.gvt.flow;
 
 import java.awt.Shape;
@@ -18,6 +27,11 @@
 import org.apache.batik.ext.awt.geom.SegmentList;
 import org.apache.batik.ext.awt.geom.Segment;
 
+/**
+ * A class to hold flow region information for a given shape.
+ *
+ * @version $Id$
+ */
 public class FlowRegions {
     Shape flowShape;
     SegmentList sl;
diff --git a/sources/org/apache/batik/gvt/flow/FlowTextLayoutFactory.java b/sources/org/apache/batik/gvt/flow/FlowTextLayoutFactory.java
index a0242ad..11dfd28 100644
--- a/sources/org/apache/batik/gvt/flow/FlowTextLayoutFactory.java
+++ b/sources/org/apache/batik/gvt/flow/FlowTextLayoutFactory.java
@@ -28,7 +28,7 @@
  * FlowRoot instances.
  *
  * @see org.apache.batik.gvt.text.TextSpanLayout
- * @author <a href="dewese@apache.org">Thomas DeWeese</a>
+ * @author <a href="mailto:dewese@apache.org">Thomas DeWeese</a>
  * @version $Id$
  */
 public class FlowTextLayoutFactory implements TextLayoutFactory {
diff --git a/sources/org/apache/batik/gvt/flow/FlowTextNode.java b/sources/org/apache/batik/gvt/flow/FlowTextNode.java
index a1ac81d..860249a 100644
--- a/sources/org/apache/batik/gvt/flow/FlowTextNode.java
+++ b/sources/org/apache/batik/gvt/flow/FlowTextNode.java
@@ -29,7 +29,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class FlowTextNode extends TextNode{
diff --git a/sources/org/apache/batik/gvt/flow/FlowTextPainter.java b/sources/org/apache/batik/gvt/flow/FlowTextPainter.java
index 4918f9c..3ed9bc0 100644
--- a/sources/org/apache/batik/gvt/flow/FlowTextPainter.java
+++ b/sources/org/apache/batik/gvt/flow/FlowTextPainter.java
@@ -32,7 +32,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class FlowTextPainter extends StrokingTextPainter {
diff --git a/sources/org/apache/batik/gvt/flow/GlyphGroupInfo.java b/sources/org/apache/batik/gvt/flow/GlyphGroupInfo.java
index bbe2931..f18ac18 100644
--- a/sources/org/apache/batik/gvt/flow/GlyphGroupInfo.java
+++ b/sources/org/apache/batik/gvt/flow/GlyphGroupInfo.java
@@ -25,7 +25,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 class GlyphGroupInfo {
diff --git a/sources/org/apache/batik/gvt/flow/LineInfo.java b/sources/org/apache/batik/gvt/flow/LineInfo.java
index a5564a8..780731e 100644
--- a/sources/org/apache/batik/gvt/flow/LineInfo.java
+++ b/sources/org/apache/batik/gvt/flow/LineInfo.java
@@ -26,7 +26,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class LineInfo {
diff --git a/sources/org/apache/batik/gvt/flow/WordInfo.java b/sources/org/apache/batik/gvt/flow/WordInfo.java
index 1759070..5ddc5ae 100644
--- a/sources/org/apache/batik/gvt/flow/WordInfo.java
+++ b/sources/org/apache/batik/gvt/flow/WordInfo.java
@@ -26,7 +26,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 class WordInfo {
diff --git a/sources/org/apache/batik/gvt/font/AWTFontFamily.java b/sources/org/apache/batik/gvt/font/AWTFontFamily.java
index 1d0cb7a..691615b 100644
--- a/sources/org/apache/batik/gvt/font/AWTFontFamily.java
+++ b/sources/org/apache/batik/gvt/font/AWTFontFamily.java
@@ -38,7 +38,7 @@
     /**
      * Constructs an AWTFontFamily with the specified familyName.
      *
-     * @param familyName The name of the font family.
+     * @param fontFace The name of the font family.
      */
     public AWTFontFamily(GVTFontFace fontFace) {
         this.fontFace = fontFace;
@@ -56,7 +56,7 @@
     /**
      * Constructs an AWTFontFamily with the specified familyName.
      *
-     * @param familyName The name of the font family.
+     * @param fontFace The name of the font family.
      */
     public AWTFontFamily(GVTFontFace fontFace, Font font) {
         this.fontFace = fontFace;
diff --git a/sources/org/apache/batik/gvt/font/FontFamilyResolver.java b/sources/org/apache/batik/gvt/font/FontFamilyResolver.java
index aec1df8..2b5a817 100644
--- a/sources/org/apache/batik/gvt/font/FontFamilyResolver.java
+++ b/sources/org/apache/batik/gvt/font/FontFamilyResolver.java
@@ -168,8 +168,6 @@
      * family cannot be resolved then null will be returned.
      *
      * @param fontFamily The UnresolvedFontFamily to resolve
-     * @param textAttributes The attributes of the font that will be derived
-     * from the resolved font family.
      *
      * @return A resolved GVTFontFamily or null if the font family could not
      * be resolved.
diff --git a/sources/org/apache/batik/gvt/font/GVTFontFace.java b/sources/org/apache/batik/gvt/font/GVTFontFace.java
index cae8579..b088530 100644
--- a/sources/org/apache/batik/gvt/font/GVTFontFace.java
+++ b/sources/org/apache/batik/gvt/font/GVTFontFace.java
@@ -24,7 +24,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class GVTFontFace implements SVGConstants {
diff --git a/sources/org/apache/batik/gvt/font/Glyph.java b/sources/org/apache/batik/gvt/font/Glyph.java
index 1492b35..69af5f5 100644
--- a/sources/org/apache/batik/gvt/font/Glyph.java
+++ b/sources/org/apache/batik/gvt/font/Glyph.java
@@ -212,7 +212,7 @@
     /**
      * Sets the transform to be applied to this glyph.
      *
-     * @param The transform to set.
+     * @param transform The transform to set.
      */
     public void setTransform(AffineTransform transform) {
         this.transform = transform;
@@ -265,8 +265,10 @@
      * Returns the metics of this Glyph with the specified kerning value
      * applied.
      *
-     * @param kern The kerning value to apply when calculating the glyph
-     * metrics.  
+     * @param hkern The horizontal kerning value to apply when calculating
+     *              the glyph metrics.  
+     * @param vkern The horizontal vertical value to apply when calculating
+     *              the glyph metrics.  
      * @return The kerned glyph metics
      */
     public GVTGlyphMetrics getGlyphMetrics(float hkern, float vkern) {
@@ -359,7 +361,6 @@
      * Draws this glyph.
      *
      * @param graphics2D The Graphics2D object to draw to.
-     * @param context The current rendering context.
      */
     public void draw(Graphics2D graphics2D) {
         AffineTransform tr = 
diff --git a/sources/org/apache/batik/gvt/font/SVGGVTGlyphVector.java b/sources/org/apache/batik/gvt/font/SVGGVTGlyphVector.java
index 6c8d6c0..c139a21 100644
--- a/sources/org/apache/batik/gvt/font/SVGGVTGlyphVector.java
+++ b/sources/org/apache/batik/gvt/font/SVGGVTGlyphVector.java
@@ -502,7 +502,7 @@
         if ( bounds2D == null ){
             bounds2D = new Rectangle2D.Float();
         }
-        cacheTPI = tpi;
+        cacheTPI = new TextPaintInfo(tpi);
         return bounds2D;
     }
 
diff --git a/sources/org/apache/batik/gvt/font/UnresolvedFontFamily.java b/sources/org/apache/batik/gvt/font/UnresolvedFontFamily.java
index 21459e8..cb21f8c 100644
--- a/sources/org/apache/batik/gvt/font/UnresolvedFontFamily.java
+++ b/sources/org/apache/batik/gvt/font/UnresolvedFontFamily.java
@@ -34,7 +34,7 @@
     /**
      * Constructs an UnresolvedFontFamily with the specified familyName.
      *
-     * @param familyName The name of the font family.
+     * @param fontFace The name of the font family.
      */
     public UnresolvedFontFamily(GVTFontFace fontFace) {
         this.fontFace = fontFace;
diff --git a/sources/org/apache/batik/gvt/renderer/BasicTextPainter.java b/sources/org/apache/batik/gvt/renderer/BasicTextPainter.java
index f6fb42d..df71dbc 100644
--- a/sources/org/apache/batik/gvt/renderer/BasicTextPainter.java
+++ b/sources/org/apache/batik/gvt/renderer/BasicTextPainter.java
@@ -34,8 +34,8 @@
  * Suitable for use with "standard" java.awt.font.TextAttributes only.
  * @see java.awt.font.TextAttribute
  *
- * @author <a href="bill.haneman@ireland.sun.com>Bill Haneman</a>
- * @author <a href="vincent.hardy@sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
+ * @author <a href="mailto:vincent.hardy@sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public abstract class BasicTextPainter implements TextPainter {
@@ -123,6 +123,15 @@
         public TextNode getTextNode() {
             return node;
         }
+
+    /**
+     * Returns the index of the character that has been hit.
+     *
+     * @return The character index.
+     */
+        public int getCharIndex() { 
+            return hit.getCharIndex(); 
+        }
     }
 }
 
diff --git a/sources/org/apache/batik/gvt/renderer/ConcreteTextPainter.java b/sources/org/apache/batik/gvt/renderer/ConcreteTextPainter.java
index de6180c..0067e8b 100644
--- a/sources/org/apache/batik/gvt/renderer/ConcreteTextPainter.java
+++ b/sources/org/apache/batik/gvt/renderer/ConcreteTextPainter.java
@@ -31,12 +31,14 @@
  * @version $Id$
  */
 public abstract class ConcreteTextPainter extends BasicTextPainter {
+
     /**
      * Paints the specified attributed character iterator using the
      * specified Graphics2D and context and font context.
-     * @param shape the shape to paint
+     * @param aci the AttributedCharacterIterator containing the text
+     * @param location the location to paint the text
+     * @param anchor the text anchor position
      * @param g2d the Graphics2D to use
-     * @param context rendering context.
      */
     public void paint(AttributedCharacterIterator aci, Point2D location, 
                       TextNode.Anchor anchor, Graphics2D g2d) {
diff --git a/sources/org/apache/batik/gvt/renderer/DynamicRenderer.java b/sources/org/apache/batik/gvt/renderer/DynamicRenderer.java
index 825236e..3d23747 100644
--- a/sources/org/apache/batik/gvt/renderer/DynamicRenderer.java
+++ b/sources/org/apache/batik/gvt/renderer/DynamicRenderer.java
@@ -119,7 +119,6 @@
                 (rootCR.getColorModel(), 
                  workingRaster,
                  rootCR.getColorModel().isAlphaPremultiplied(), null);
-
         }
 
         if (!isDoubleBuffered) {
@@ -139,7 +138,7 @@
      * the failed rendering will be visible in the image returned
      * by getOffscreen.
      *
-     * @param areas a List of regions to be repainted, in the current
+     * @param devRLM regions to be repainted, in the current
      * user space coordinate system.  
      */
     // long lastFrame = -1;
@@ -160,8 +159,8 @@
         updateWorkingBuffers();
         if ((rootCR == null)           ||
             (workingBaseRaster == null)) {
-            // System.out.println("RootCR: " + rootCR);
-            // System.out.println("wrkBaseRaster: " + workingBaseRaster);
+            // System.err.println("RootCR: " + rootCR);
+            // System.err.println("wrkBaseRaster: " + workingBaseRaster);
             return;
         }
         cr = rootCR;
diff --git a/sources/org/apache/batik/gvt/renderer/Renderer.java b/sources/org/apache/batik/gvt/renderer/Renderer.java
index eb9dd7e..ca9539b 100644
--- a/sources/org/apache/batik/gvt/renderer/Renderer.java
+++ b/sources/org/apache/batik/gvt/renderer/Renderer.java
@@ -26,7 +26,7 @@
 /**
  * Interface for GVT Renderers.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public interface Renderer {
@@ -46,7 +46,7 @@
     /**
      * Repaints the associated GVT tree at least under <tt>area</tt>.
      * 
-     * @param areas the region to be repainted, in the current user
+     * @param area the region to be repainted, in the current user
      * space coordinate system.  
      */
     public void repaint(Shape area);
@@ -84,12 +84,12 @@
      * Turns on/off double buffering in renderer.  Turning off
      * double buffering makes it possible to see the ongoing results
      * of a render operation.
-     .  */
+     */
     public void setDoubleBuffered(boolean isDoubleBuffered);
 
     /**
      * Cause the renderer to ask to be removed from external reference
-     * lists, de-register as a listener to events, etc. so that
+     * lists, de-register as a listener to events, etc.  This is so that
      * in the absence of other existing references, it can be
      * removed by the garbage collector.
      */
diff --git a/sources/org/apache/batik/gvt/renderer/StaticRenderer.java b/sources/org/apache/batik/gvt/renderer/StaticRenderer.java
index f0ee3ee..2f6a024 100755
--- a/sources/org/apache/batik/gvt/renderer/StaticRenderer.java
+++ b/sources/org/apache/batik/gvt/renderer/StaticRenderer.java
@@ -51,7 +51,7 @@
  * Simple implementation of the Renderer that simply does static
  * rendering in an offscreen buffer image.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public class StaticRenderer implements ImageRenderer {
@@ -118,7 +118,7 @@
     }
 
     /**
-     * @param offScreen image where the Renderer should do its rendering
+     * Creates a new StaticRenderer object.
      */
     public StaticRenderer(){
         renderingHints = new RenderingHints(defaultRenderingHints);
diff --git a/sources/org/apache/batik/gvt/renderer/StrokingTextPainter.java b/sources/org/apache/batik/gvt/renderer/StrokingTextPainter.java
index 5bb4cca..7cafc21 100644
--- a/sources/org/apache/batik/gvt/renderer/StrokingTextPainter.java
+++ b/sources/org/apache/batik/gvt/renderer/StrokingTextPainter.java
@@ -65,7 +65,7 @@
  * @see org.apache.batik.gvt.TextPainter
  * @see org.apache.batik.gvt.text.GVTAttributedCharacterIterator
  *
- * @author <a href="bill.haneman@ireland.sun.com>Bill Haneman</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
  * @version $Id$
  */
 public class StrokingTextPainter extends BasicTextPainter {
@@ -1144,7 +1144,7 @@
      * Returns the outline of the specified decoration type.
      *
      * @param textRuns The list of text runs to get the decoration outline for.
-     * @param decoratonType Indicates the type of decoration required.
+     * @param decorationType Indicates the type of decoration required.
      * eg. underline, overline or strikethrough.
      *
      * @return The decoration outline or null if the text is not decorated.
@@ -1264,7 +1264,7 @@
      * If the decoration has no stroke it will return the fill outline
      *
      * @param textRuns The list of text runs to get the decoration outline for.
-     * @param decoratonType Indicates the type of decoration required.
+     * @param decorationType Indicates the type of decoration required.
      * eg. underline, overline or strikethrough.
      *
      * @return The decoration outline or null if the text is not decorated.
@@ -1446,7 +1446,7 @@
     public Mark selectLast(TextNode node) {
         AttributedCharacterIterator aci;
         aci = node.getAttributedCharacterIterator();
-        TextHit textHit = new TextHit(aci.getEndIndex(), false);
+        TextHit textHit = new TextHit(aci.getEndIndex()-1, false);
         return  new BasicTextPainter.BasicMark(node, textHit);
     }
 
@@ -1469,8 +1469,8 @@
             start = (BasicTextPainter.BasicMark) startMark;
             finish = (BasicTextPainter.BasicMark) finishMark;
         } catch (ClassCastException cce) {
-            throw new
-            Error("This Mark was not instantiated by this TextPainter class!");
+            throw new Error
+                ("This Mark was not instantiated by this TextPainter class!");
         }
 
         TextNode textNode = start.getTextNode();
diff --git a/sources/org/apache/batik/gvt/svg12/MultiResGraphicsNode.java b/sources/org/apache/batik/gvt/svg12/MultiResGraphicsNode.java
index 547adb0..f63658a 100644
--- a/sources/org/apache/batik/gvt/svg12/MultiResGraphicsNode.java
+++ b/sources/org/apache/batik/gvt/svg12/MultiResGraphicsNode.java
@@ -35,7 +35,7 @@
  * RasterRable This is used to wrap a Rendered Image back into the
  * RenderableImage world.
  *
- * @author <a href="mailto:Thomas.DeWeese@Kodak.com>Thomas DeWeese</a>
+ * @author <a href="mailto:Thomas.DeWeese@Kodak.com">Thomas DeWeese</a>
  * @version $Id$
  */
 public class MultiResGraphicsNode
diff --git a/sources/org/apache/batik/gvt/text/ArabicTextHandler.java b/sources/org/apache/batik/gvt/text/ArabicTextHandler.java
index d4929c6..3e646ae 100644
--- a/sources/org/apache/batik/gvt/text/ArabicTextHandler.java
+++ b/sources/org/apache/batik/gvt/text/ArabicTextHandler.java
@@ -39,10 +39,23 @@
 
     private final static Map charMap = new HashMap(54);
 
+    private static final AttributedCharacterIterator.Attribute ARABIC_FORM =
+        GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM;
+    private static final Integer ARABIC_NONE =
+        GVTAttributedCharacterIterator.TextAttribute.ARABIC_NONE;
+    private static final Integer ARABIC_ISOLATED =
+        GVTAttributedCharacterIterator.TextAttribute.ARABIC_ISOLATED;
+    private static final Integer ARABIC_TERMINAL =
+        GVTAttributedCharacterIterator.TextAttribute.ARABIC_TERMINAL;
+    private static final Integer ARABIC_INITIAL =
+        GVTAttributedCharacterIterator.TextAttribute.ARABIC_INITIAL;
+    private static final Integer ARABIC_MEDIAL =
+        GVTAttributedCharacterIterator.TextAttribute.ARABIC_MEDIAL;
+
     /**
      * If the AttributedString contains any arabic chars, assigns an
-     * arabic form attribute, ie. initial|medial|terminal|isolated, to
-     * each arabic char.
+     * arabic form attribute, i&#x2e;e&#x2e; initial|medial|terminal|isolated,
+     * to each arabic char.
      *
      * @param as The string to attach the arabic form attributes to.
      * @return An attributed string with arabic form attributes.  
@@ -80,6 +93,7 @@
                 }
             }
         }
+
         if (didSomeReordering) {
             // need to reconstruct the reordered attributed string
             String reorderedString = "";
@@ -94,8 +108,10 @@
                 Map attributes = aci.getAttributes();
                 reorderedAS.addAttributes(attributes, i, i+1);
             }
-            if (charOrder[0] == (aci.getBeginIndex()+1) && charOrder[1] == aci.getBeginIndex()) {
-                // have swapped the first 2 chars, may need to move any position attributes
+            if ((charOrder[0] == (aci.getBeginIndex()+1)) && 
+                (charOrder[1] ==  aci.getBeginIndex())) {
+                // have swapped the first 2 chars, may need to move
+                // any position attributes
 
                 aci.first();
                 Float x = (Float) aci.getAttribute(
@@ -104,112 +120,95 @@
                     GVTAttributedCharacterIterator.TextAttribute.Y);
 
                 if (x != null && !x.isNaN()) {
-                    reorderedAS.addAttribute(GVTAttributedCharacterIterator.TextAttribute.X,
-                        new Float(Float.NaN), 1, 2);
-                    reorderedAS.addAttribute(GVTAttributedCharacterIterator.TextAttribute.X, x, 0, 1);
+                    reorderedAS.addAttribute
+                        (GVTAttributedCharacterIterator.TextAttribute.X,
+                         new Float(Float.NaN), 1, 2);
+                    reorderedAS.addAttribute
+                        (GVTAttributedCharacterIterator.TextAttribute.X, 
+                         x, 0, 1);
                 }
                 if (y != null && !y.isNaN()) {
-                    reorderedAS.addAttribute(GVTAttributedCharacterIterator.TextAttribute.Y,
-                        new Float(Float.NaN), 1, 2);
-                    reorderedAS.addAttribute(GVTAttributedCharacterIterator.TextAttribute.Y, y, 0, 1);
+                    reorderedAS.addAttribute
+                        (GVTAttributedCharacterIterator.TextAttribute.Y,
+                         new Float(Float.NaN), 1, 2);
+                    reorderedAS.addAttribute
+                        (GVTAttributedCharacterIterator.TextAttribute.Y, 
+                         y, 0, 1);
                 }
             }
             as = reorderedAS;
         }
 
-
         // first assign none to all arabic letters
         int c;
         aci = as.getIterator();
         for (int i = aci.getBeginIndex(); i < aci.getEndIndex(); i++) {
             c = aci.setIndex(i);
-            if (c >= arabicStart && c <= arabicEnd) {
-                as.addAttribute(GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM,
-                                GVTAttributedCharacterIterator.TextAttribute.ARABIC_NONE, i, i+1);
+            if ((c >= arabicStart) && (c <= arabicEnd)) {
+                as.addAttribute(ARABIC_FORM, ARABIC_NONE,i, i+1);
             }
         }
-        aci.first();
+        
+        aci = as.getIterator();  // Make sure ACI tracks ARABIC_FORM
+        int end   = aci.getBeginIndex();
 
-        boolean moreRuns = true;
+        Integer currentForm = ARABIC_NONE;
         // for each run of arabic chars, assign the appropriate form
-        while (moreRuns) {
-            int start = aci.getRunStart(
-                    GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM);
-            int end = aci.getRunLimit(
-                    GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM);
+        while (aci.setIndex(end) != AttributedCharacterIterator.DONE) {
+            int start = aci.getRunStart(ARABIC_FORM);
+            end       = aci.getRunLimit(ARABIC_FORM);
+            char currentChar = aci.setIndex(start);
+            currentForm      = (Integer)aci.getAttribute(ARABIC_FORM);
 
-            aci.setIndex(start);
-
-            if (aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM) != null) {
-
+            if (currentForm == null) {
                 // only modify if the chars in the run are arabic
-
-                int currentIndex = start;
-                while (currentIndex < end) {
-
-                    char currentChar=  aci.setIndex(currentIndex);
-                    char prevChar = currentChar;
-                    int prevCharIndex = currentIndex-1;
-                    if (currentIndex > start) {  // if not at the start
-                        prevChar = aci.setIndex(prevCharIndex);
-                    }
-
-                    while (arabicCharTransparent(currentChar) && currentIndex < end) {
-                        currentIndex++;
-                        currentChar = aci.setIndex(currentIndex);
-                    }
-                    if (currentIndex >= end) {
-                        break;
-                    }
-
-                    if (!arabicCharTransparent(currentChar)) { // if current char is not transparent
-
-                        if (prevCharIndex >= start) {  // if not at the start
-
-                            // if prev char right AND current char left
-                            if (arabicCharShapesRight(prevChar)
-                                && arabicCharShapesLeft(currentChar)) {
-
-                                // then single increment the for of the previous char
-                                aci.setIndex(prevCharIndex);
-                                Integer prevForm = (Integer)aci.getAttribute(
-                                    GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM);
-                                prevForm = new Integer(prevForm.intValue()+1);
-
-                                as.addAttribute(GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM,
-                                                prevForm, prevCharIndex, prevCharIndex+1);
-
-                                // and set the form of the current char to INITIAL
-                                as.addAttribute(GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM,
-                                                GVTAttributedCharacterIterator.TextAttribute.ARABIC_INITIAL,
-                                                currentIndex, currentIndex+1);
-                             }
-
-                            // if not prev char right OR not current char left
-                            // AND current char can be shaped
-                            if ((!arabicCharShapesRight(prevChar) ||
-                                 !arabicCharShapesLeft(currentChar))
-                                 && arabicCharShaped(currentChar)) {
-
-                                // set the form of the current char to ISOLATE
-                                as.addAttribute(GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM,
-                                                GVTAttributedCharacterIterator.TextAttribute.ARABIC_ISOLATED,
-                                                currentIndex, currentIndex+1);
-                            }
-
-                        // if this is the first arabic char and its shaped, set to ISOLATE
-                        } else if (arabicCharShaped(currentChar)) {
-                            // set the form of the current char to ISOLATE
-                            as.addAttribute(GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM,
-                                            GVTAttributedCharacterIterator.TextAttribute.ARABIC_ISOLATED,
-                                          currentIndex, currentIndex+1);
-                        }
-                    }
-                    currentIndex++;
-                }
+                continue; 
             }
-            if (aci.setIndex(end) == AttributedCharacterIterator.DONE) {
-                moreRuns = false;
+            
+
+            int currentIndex = start;
+            int prevCharIndex = start-1;
+            while (currentIndex < end) {
+                char prevChar = currentChar;
+                currentChar=  aci.setIndex(currentIndex);
+                while (arabicCharTransparent(currentChar) && 
+                       (currentIndex < end)) {
+                    currentIndex++;
+                    currentChar = aci.setIndex(currentIndex);
+                }
+                if (currentIndex >= end) {
+                    break;
+                }
+
+                Integer prevForm = currentForm;
+                currentForm = ARABIC_NONE;
+                if (prevCharIndex >= start) {  // if not at the start
+                    // if prev char right AND current char left
+                    if (arabicCharShapesRight(prevChar)
+                        && arabicCharShapesLeft(currentChar)) {
+                        // Increment the form of the previous char
+                        prevForm = new Integer(prevForm.intValue()+1);
+                        as.addAttribute(ARABIC_FORM, prevForm, 
+                                        prevCharIndex, prevCharIndex+1);
+
+                        // and set the form of the current char to INITIAL
+                        currentForm = ARABIC_INITIAL;
+                    } else if (arabicCharShaped(currentChar)) {
+                        // set the form of the current char to ISOLATE
+                        currentForm = ARABIC_ISOLATED;
+                    }
+
+                    // if this is the first arabic char and its
+                    // shaped, set to ISOLATE
+                } else if (arabicCharShaped(currentChar)) {
+                    // set the form of the current char to ISOLATE
+                    currentForm = ARABIC_ISOLATED;
+                }
+                if (currentForm != ARABIC_NONE)
+                    as.addAttribute(ARABIC_FORM, currentForm,
+                                    currentIndex, currentIndex+1);
+                prevCharIndex = currentIndex;
+                currentIndex++;
             }
         }
         return as;
@@ -264,11 +263,11 @@
      */
     public static boolean arabicCharTransparent(char c) {
         int charVal = c;
-        if ((charVal >= 0x64B && charVal <= 0x655)
-            || (charVal == 0x0670)
-            || (charVal >= 0x06D6 && charVal <= 0x06E4)
-            || (charVal >= 0x06E7 && charVal <= 0x06E8)
-            || (charVal >= 0x06EA && charVal <= 0x06ED)) {
+        if ((charVal >= 0x064B && charVal <= 0x0655) ||
+            (charVal == 0x0670)                      ||
+            (charVal >= 0x06D6 && charVal <= 0x06E4) ||
+            (charVal >= 0x06E7 && charVal <= 0x06E8) ||
+            (charVal >= 0x06EA && charVal <= 0x06ED)) {
             return true;
         }
         return false;
@@ -283,9 +282,9 @@
      */
     private static boolean arabicCharShapesRight(char c) {
         int charVal = c;
-        if ((charVal >= 0x622 && charVal <= 0x625)
-         || (charVal == 0x627)
-         || (charVal == 0x629)
+        if ((charVal >= 0x0622 && charVal <= 0x0625)
+         || (charVal == 0x0627)
+         || (charVal == 0x0629)
          || (charVal >= 0x062F && charVal <= 0x0632)
          || (charVal == 0x0648)
          || (charVal >= 0x0671 && charVal <= 0x0673)
@@ -312,8 +311,8 @@
     private static boolean arabicCharShapesDuel(char c) {
         int charVal = c;
 
-        if ((charVal == 0x626)
-         || (charVal == 0x628)
+        if ((charVal == 0x0626)
+         || (charVal == 0x0628)
          || (charVal >= 0x062A && charVal <= 0x062E)
          || (charVal >= 0x0633 && charVal <= 0x063A)
          || (charVal >= 0x0641 && charVal <= 0x0647)
@@ -364,12 +363,12 @@
      * exists.
      */
     public static int getSubstituteChar(String unicode, int form) {
-        if (charMap.containsKey(unicode) && form > 0) {
-            int chars[] = (int[])charMap.get(unicode);
-            if (chars[form-1] > 0) {
-                return chars[form-1];
-            }
-        }
+        if (form == 0) return -1;
+        int chars[] = (int[])charMap.get(unicode);
+        if (chars == null) return -1;
+
+        if (chars[form-1] > 0)
+            return chars[form-1];
         return -1;
     }
 
@@ -391,39 +390,36 @@
         for (int i = aci.getBeginIndex(); i < aci.getEndIndex(); i++) {
             char c = aci.setIndex(i);
             if (arabicChar(c)) {
-                Integer form = (Integer)aci.getAttribute(
-                    GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM);
-
+                Integer form = (Integer)aci.getAttribute(ARABIC_FORM);
                 // see if the c is the start of a ligature
                 if (charStartsLigature(c) && i < aci.getEndIndex()) {
                     char nextChar = aci.setIndex(i+1);
-                    Integer nextForm = (Integer)aci.getAttribute(
-                    GVTAttributedCharacterIterator.TextAttribute.ARABIC_FORM);
+                    Integer nextForm = (Integer)aci.getAttribute(ARABIC_FORM);
                     if (form != null && nextForm != null) {
-                        if (form.equals(GVTAttributedCharacterIterator.TextAttribute.ARABIC_TERMINAL)
-                            && nextForm.equals(GVTAttributedCharacterIterator.TextAttribute.ARABIC_INITIAL)) {
+                        if (form.equals(ARABIC_TERMINAL)
+                            && nextForm.equals(ARABIC_INITIAL)) {
                             // look for an isolated ligature
-                            int substChar = ArabicTextHandler.getSubstituteChar("" + c + nextChar,
-                                GVTAttributedCharacterIterator.TextAttribute.ARABIC_ISOLATED.intValue());
+                            int substChar = ArabicTextHandler.getSubstituteChar
+                                ("" + c + nextChar,ARABIC_ISOLATED.intValue());
                             if (substChar > -1) {
                                 substString += (char)substChar;
                                 i++;
                                 continue;
                             }
-                        } else if (form.equals(GVTAttributedCharacterIterator.TextAttribute.ARABIC_TERMINAL)) {
+                        } else if (form.equals(ARABIC_TERMINAL)) {
                             // look for a terminal ligature
-                            int substChar = ArabicTextHandler.getSubstituteChar("" + c + nextChar,
-                                GVTAttributedCharacterIterator.TextAttribute.ARABIC_TERMINAL.intValue());
+                            int substChar = ArabicTextHandler.getSubstituteChar
+                                ("" + c + nextChar,ARABIC_TERMINAL.intValue());
                             if (substChar > -1) {
                                 substString += (char)substChar;
                                 i++;
                                 continue;
                             }
-                        } else if (form.equals(GVTAttributedCharacterIterator.TextAttribute.ARABIC_MEDIAL)
-                                && nextForm.equals(GVTAttributedCharacterIterator.TextAttribute.ARABIC_MEDIAL)) {
+                        } else if (form.equals(ARABIC_MEDIAL)
+                                && nextForm.equals(ARABIC_MEDIAL)) {
                             // look for a medial ligature
-                            int substChar = ArabicTextHandler.getSubstituteChar("" + c + nextChar,
-                                GVTAttributedCharacterIterator.TextAttribute.ARABIC_MEDIAL.intValue());
+                            int substChar = ArabicTextHandler.getSubstituteChar
+                                ("" + c + nextChar,ARABIC_MEDIAL.intValue());
                             if (substChar > -1) {
                                 substString += (char)substChar;
                                 i++;
diff --git a/sources/org/apache/batik/gvt/text/ConcreteTextLayoutFactory.java b/sources/org/apache/batik/gvt/text/ConcreteTextLayoutFactory.java
index c23eaf5..69a6751 100644
--- a/sources/org/apache/batik/gvt/text/ConcreteTextLayoutFactory.java
+++ b/sources/org/apache/batik/gvt/text/ConcreteTextLayoutFactory.java
@@ -26,7 +26,7 @@
  * AttributedCharacterIterator instances.
  *
  * @see org.apache.batik.gvt.text.TextSpanLayout
- * @author <a href="bill.haneman@ireland.sun.com>Bill Haneman</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
  * @version $Id$
  */
 public class ConcreteTextLayoutFactory implements TextLayoutFactory {
diff --git a/sources/org/apache/batik/gvt/text/ConcreteTextSelector.java b/sources/org/apache/batik/gvt/text/ConcreteTextSelector.java
index 890a7f1..52c249a 100644
--- a/sources/org/apache/batik/gvt/text/ConcreteTextSelector.java
+++ b/sources/org/apache/batik/gvt/text/ConcreteTextSelector.java
@@ -29,6 +29,7 @@
 import java.util.Iterator;
 
 import org.apache.batik.gvt.GraphicsNode;
+import org.apache.batik.gvt.RootGraphicsNode;
 import org.apache.batik.gvt.Selectable;
 import org.apache.batik.gvt.Selector;
 import org.apache.batik.gvt.TextNode;
@@ -40,7 +41,6 @@
 import org.apache.batik.gvt.event.SelectionListener;
 
 /**
- * ConcreteTextSelector.java:
  * A simple implementation of GraphicsNodeMouseListener for text selection.
  *
  * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
@@ -49,9 +49,10 @@
 
 public class ConcreteTextSelector implements Selector {
 
-    private ArrayList listeners = null;
-    private GraphicsNode selectionNode = null;
-    private GraphicsNode currentNode = null;
+    private ArrayList listeners;
+    private GraphicsNode selectionNode;
+    private RootGraphicsNode selectionNodeRoot;
+    private GraphicsNode currentNode;
     private int firstHit;
     private int lastHit;
 
@@ -101,8 +102,11 @@
 
     public void changeStarted (GraphicsNodeChangeEvent gnce) {
     }
+
     public void changeCompleted (GraphicsNodeChangeEvent gnce) {
-        if (selectionNode == null) return;
+        if (selectionNode == null) {
+            return;
+        }
         Shape newShape =
             ((Selectable)selectionNode).getHighlightShape();
         dispatchSelectionEvent
@@ -113,24 +117,26 @@
 
     public void setSelection(Mark begin, Mark end) {
         TextNode node = begin.getTextNode();
-        if (node != end.getTextNode())
+        if (node != end.getTextNode()) {
             throw new Error("Markers not from same TextNode");
+        }
         node.setSelection(begin, end);
         selectionNode = node;
+        selectionNodeRoot = node.getRoot();
         Object selection = getSelection();
         Shape  shape     = node.getHighlightShape();
         dispatchSelectionEvent(new SelectionEvent
             (selection, SelectionEvent.SELECTION_DONE, shape));
-        copyToClipboard(selection);
     }
 
     public void clearSelection() {
-        if (selectionNode == null) 
+        if (selectionNode == null) {
             return;
+        }
         dispatchSelectionEvent(new SelectionEvent
             (null, SelectionEvent.SELECTION_CLEARED, null));
-        // copyToClipboard(null);
         selectionNode = null;
+        selectionNodeRoot = null;
     }
 
     /*
@@ -148,14 +154,12 @@
         }
 
         GraphicsNode source = evt.getGraphicsNode();
-
         if (isDeselectGesture(evt)) {
-            if (selectionNode != null)
-                selectionNode.getRoot()
-                    .removeTreeGraphicsNodeChangeListener(this);
-
+            if (selectionNode != null) {
+                selectionNodeRoot.removeTreeGraphicsNodeChangeListener(this);
+            }
             clearSelection();
-        } else if ((source instanceof Selectable) && (mevt != null)) {
+        } else if (mevt != null) {
 
             Point2D p = new Point2D.Double(mevt.getX(), mevt.getY());
             AffineTransform t = source.getGlobalTransform();
@@ -170,17 +174,21 @@
             }
             p = t.transform(p, null);
 
-            if (isSelectStartGesture(evt)) {
+            if ((source instanceof Selectable) && 
+                (isSelectStartGesture(evt))) {
                 if (selectionNode != source) {
-                    if (selectionNode != null)
-                        selectionNode.getRoot()
+                    if (selectionNode != null) {
+                        selectionNodeRoot
                             .removeTreeGraphicsNodeChangeListener(this);
-                    if (source != null)
-                        source.getRoot()
+                    }
+                    selectionNode = source;
+                    if (source != null) {
+                        selectionNodeRoot = source.getRoot();
+                        selectionNodeRoot
                             .addTreeGraphicsNodeChangeListener(this);
+                    }
                 }
 
-                selectionNode = source;
                 ((Selectable) source).selectAt(p.getX(), p.getY());
                 dispatchSelectionEvent(
                         new SelectionEvent(null,
@@ -188,36 +196,26 @@
                                 null));
 
             } else if (isSelectEndGesture(evt)) {
-                if (selectionNode != source) {
-                    if (selectionNode != null)
-                        selectionNode.getRoot()
-                            .removeTreeGraphicsNodeChangeListener(this);
-                    if (source != null)
-                        source.getRoot()
-                            .addTreeGraphicsNodeChangeListener(this);
+                if (selectionNode == source)  {
+                    ((Selectable) source).selectTo(p.getX(), p.getY());
                 }
-                selectionNode = source;
-
-                ((Selectable) source).selectTo(p.getX(), p.getY());
-
                 Object oldSelection = getSelection();
-                Shape newShape =
-                    ((Selectable) source).getHighlightShape();
-                dispatchSelectionEvent(
-                        new SelectionEvent(oldSelection,
-                                SelectionEvent.SELECTION_DONE,
-                                newShape));
-                copyToClipboard(oldSelection);
-            } else
-
-            if (isSelectContinueGesture(evt)) {
+                if (selectionNode != null) {
+                    Shape newShape;
+                    newShape = ((Selectable)selectionNode).getHighlightShape();
+                    dispatchSelectionEvent
+                        (new SelectionEvent(oldSelection,
+                                            SelectionEvent.SELECTION_DONE,
+                                            newShape));
+                }
+            } else if (isSelectContinueGesture(evt)) {
 
                 if (selectionNode == source) {
                     boolean result = ((Selectable) source).selectTo(p.getX(), 
                                                                     p.getY());
                     if (result) {
                         Shape newShape =
-                        ((Selectable) source).getHighlightShape();
+                            ((Selectable) selectionNode).getHighlightShape();
 
                         dispatchSelectionEvent(
                             new SelectionEvent(null,
@@ -225,17 +223,20 @@
                                 newShape));
                     }
                 }
-            } else if (isSelectAllGesture(evt)) {
+            } else if ((source instanceof Selectable) && 
+                       (isSelectAllGesture(evt))) {
                 if (selectionNode != source) {
-                    if (selectionNode != null)
-                        selectionNode.getRoot()
+                    if (selectionNode != null) {
+                        selectionNodeRoot
                             .removeTreeGraphicsNodeChangeListener(this);
-                    if (source != null)
-                        source.getRoot()
+                    }
+                    selectionNode = source;
+                    if (source != null) {
+                        selectionNodeRoot = source.getRoot();
+                        selectionNodeRoot
                             .addTreeGraphicsNodeChangeListener(this);
+                    }
                 }
-                selectionNode = source;
-                
                 ((Selectable) source).selectAll(p.getX(), p.getY());
                 Object oldSelection = getSelection();
                 Shape newShape =
@@ -244,7 +245,6 @@
                         new SelectionEvent(oldSelection,
                                 SelectionEvent.SELECTION_DONE,
                                 newShape));
-                copyToClipboard(oldSelection);
             }
         }
     }
@@ -277,7 +277,7 @@
     public Object getSelection() {
         Object value = null;
         if (selectionNode instanceof Selectable) {
-            value =  ((Selectable) selectionNode).getSelection();
+            value = ((Selectable) selectionNode).getSelection();
         }
         return value;
     }
@@ -341,44 +341,6 @@
         }
     }
 
-    private void copyToClipboard(final Object o) {
-	//
-	// HACK: getSystemClipboard sometimes deadlocks on linux when called
-	// from the AWT Thread. The Thread creation prevents that.
-	//
-	new Thread() {
-	    public void run() {
-		// first see if we can access the clipboard
-		SecurityManager securityManager = System.getSecurityManager();
-		boolean canAccessClipboard = true;
-		if (securityManager != null) {
-		    try {
-			securityManager.checkSystemClipboardAccess();
-		    } catch (SecurityException e) {
-			canAccessClipboard = false;
-		    }
-		}
-		if (canAccessClipboard) {
-		    String label = "";
-		    if (o instanceof CharacterIterator) {
-			CharacterIterator iter = (CharacterIterator) o;
-			char[] cbuff = new char[iter.getEndIndex()-iter.getBeginIndex()];
-			if (cbuff.length > 0) {
-			    cbuff[0] = iter.first();
-			}
-			for (int i=1; i<cbuff.length;++i) {
-			    cbuff[i] = iter.next();
-			}
-			label = new String(cbuff);
-		    }
-		    Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
-		    StringSelection selection = new StringSelection(label);
-		    clipboard.setContents(selection, selection);
-		}
-	    }
-	}.start();
-    }
-
     private void report(GraphicsNodeEvent evt, String message) {
         GraphicsNode source = evt.getGraphicsNode();
         String label = "(non-text node)";
diff --git a/sources/org/apache/batik/gvt/text/GlyphLayout.java b/sources/org/apache/batik/gvt/text/GlyphLayout.java
index f9510e9..f0cc7ef 100644
--- a/sources/org/apache/batik/gvt/text/GlyphLayout.java
+++ b/sources/org/apache/batik/gvt/text/GlyphLayout.java
@@ -50,7 +50,7 @@
  * Implementation of TextSpanLayout which uses java.awt.font.GlyphVector.
  * @see org.apache.batik.gvt.text.TextSpanLayout
  *
- * @author <a href="bill.haneman@ireland.sun.com>Bill Haneman</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
  * @version $Id$
  */
 public class GlyphLayout implements TextSpanLayout {
@@ -385,7 +385,6 @@
      * Paints the text layout using the
      * specified Graphics2D and rendering context.
      * @param g2d the Graphics2D to use
-     * @param context The current render context
      */
     public void draw(Graphics2D g2d) {
         syncLayout();
@@ -980,9 +979,8 @@
      * character iterator.  This should already be set as an attribute
      * on the aci.
      *
-     * @param aci The character iterator to get the font attribute from.
-     *
-     * @return The GVTFont to use.  */
+     * @return The GVTFont to use.
+     */
     protected GVTFont getFont() {
         aci.first();
         GVTFont gvtFont = (GVTFont)aci.getAttributes().get(GVT_FONT);
@@ -1078,9 +1076,7 @@
      * vector. This will handle any glyph position adjustments such as
      * dx, dy and baseline offsets.  It will also handle vertical
      * layouts.
-     *
-     * @param applyOffset Specifies whether or not to add the offset position
-     * to each of the glyph positions.  */
+     */
     protected void doExplicitGlyphLayout() {
 
         this.gv.performDefaultLayout();
diff --git a/sources/org/apache/batik/gvt/text/Mark.java b/sources/org/apache/batik/gvt/text/Mark.java
index 68e02bc..a9410b1 100644
--- a/sources/org/apache/batik/gvt/text/Mark.java
+++ b/sources/org/apache/batik/gvt/text/Mark.java
@@ -29,5 +29,12 @@
     /*
      * Return the TextNode this Mark is associated with 
      */
-    TextNode getTextNode();
+    public TextNode getTextNode();
+
+    /**
+     * Returns the index of the character that has been hit.
+     *
+     * @return The character index.
+     */
+    public int getCharIndex();
 }
diff --git a/sources/org/apache/batik/gvt/text/TextHit.java b/sources/org/apache/batik/gvt/text/TextHit.java
index fc1376e..e768084 100644
--- a/sources/org/apache/batik/gvt/text/TextHit.java
+++ b/sources/org/apache/batik/gvt/text/TextHit.java
@@ -23,7 +23,7 @@
  * a <tt>TextSpanLayout</tt> instance.
  * @see org.apache.batik.gvt.text.TextSpanLayout
  *
- * @author <a href="bill.haneman@ireland.sun.com>Bill Haneman</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
  * @version $Id$
  */
 public class TextHit {
diff --git a/sources/org/apache/batik/gvt/text/TextLayoutFactory.java b/sources/org/apache/batik/gvt/text/TextLayoutFactory.java
index 7e33fbd..91a5008 100644
--- a/sources/org/apache/batik/gvt/text/TextLayoutFactory.java
+++ b/sources/org/apache/batik/gvt/text/TextLayoutFactory.java
@@ -27,7 +27,7 @@
  * instances.
  *
  * @see org.apache.batik.gvt.text.TextSpanLayout
- * @author <a href="bill.haneman@ireland.sun.com>Bill Haneman</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
  * @version $Id$
  */
 public interface TextLayoutFactory {
diff --git a/sources/org/apache/batik/gvt/text/TextPaintInfo.java b/sources/org/apache/batik/gvt/text/TextPaintInfo.java
index 36a338e..b48d38a 100644
--- a/sources/org/apache/batik/gvt/text/TextPaintInfo.java
+++ b/sources/org/apache/batik/gvt/text/TextPaintInfo.java
@@ -27,7 +27,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class TextPaintInfo {
diff --git a/sources/org/apache/batik/gvt/text/TextSpanLayout.java b/sources/org/apache/batik/gvt/text/TextSpanLayout.java
index 873a4f4..cdda69e 100644
--- a/sources/org/apache/batik/gvt/text/TextSpanLayout.java
+++ b/sources/org/apache/batik/gvt/text/TextSpanLayout.java
@@ -36,7 +36,7 @@
  * @see java.awt.font.TextLayout
  * @see org.apache.batik.gvt.TextPainter
  *
- * @author <a href="bill.haneman@ireland.sun.com>Bill Haneman</a>
+ * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
  * @version $Id$
  */
 public interface TextSpanLayout {
@@ -132,9 +132,11 @@
 
     /**
      * Returns a Shape which encloses the currently selected glyphs
-     * as specified by glyph indices <tt>begin/tt> and <tt>end</tt>.
-     * @param begin the index of the first glyph in the contiguous selection.
-     * @param end the index of the last glyph in the contiguous selection.
+     * as specified by glyph indices <tt>begin</tt> and <tt>end</tt>.
+     * @param beginCharIndex the index of the first glyph in the contiguous
+     *                       selection.
+     * @param endCharIndex the index of the last glyph in the contiguous
+     *                     selection.
      */
      public Shape getHighlightShape(int beginCharIndex, int endCharIndex);
 
diff --git a/sources/org/apache/batik/parser/AWTTransformProducer.java b/sources/org/apache/batik/parser/AWTTransformProducer.java
index 09c8367..5b86011 100644
--- a/sources/org/apache/batik/parser/AWTTransformProducer.java
+++ b/sources/org/apache/batik/parser/AWTTransformProducer.java
@@ -50,7 +50,7 @@
 
     /**
      * Utility method for creating an AffineTransform.
-     * @param r The reader used to read the transform specification.
+     * @param s The transform specification.
      */
     public static AffineTransform createAffineTransform(String s)
         throws ParseException {
diff --git a/sources/org/apache/batik/parser/DefaultFragmentIdentifierHandler.java b/sources/org/apache/batik/parser/DefaultFragmentIdentifierHandler.java
index 1319aaa..b3c5f49 100644
--- a/sources/org/apache/batik/parser/DefaultFragmentIdentifierHandler.java
+++ b/sources/org/apache/batik/parser/DefaultFragmentIdentifierHandler.java
@@ -56,7 +56,10 @@
 
     /**
      * Invoked when 'viewBox(x,y,width,height)' has been parsed.
-     * @param x&nbsp;y&nbsp;width&nbsp;height the coordinates of the viewbox.
+     * @param x the x coordinate of the viewbox.
+     * @param y the y coordinate of the viewbox.
+     * @param width the width of the viewbox.
+     * @param height the height of the viewbox.
      * @exception ParseException if an error occured while processing the
      *                           fragment identifier
      */
diff --git a/sources/org/apache/batik/parser/DefaultNumberListHandler.java b/sources/org/apache/batik/parser/DefaultNumberListHandler.java
index 77acaeb..03a82f5 100644
--- a/sources/org/apache/batik/parser/DefaultNumberListHandler.java
+++ b/sources/org/apache/batik/parser/DefaultNumberListHandler.java
@@ -53,7 +53,7 @@
     }
     
     /**
-     * Implements {@link NumberListHandler#numberValue()}.
+     * Implements {@link NumberListHandler#numberValue(float)}.
      */
     public void numberValue(float v) throws ParseException {
     }    
diff --git a/sources/org/apache/batik/parser/FragmentIdentifierHandler.java b/sources/org/apache/batik/parser/FragmentIdentifierHandler.java
index 8ea74c5..32397d5 100644
--- a/sources/org/apache/batik/parser/FragmentIdentifierHandler.java
+++ b/sources/org/apache/batik/parser/FragmentIdentifierHandler.java
@@ -46,7 +46,10 @@
 
     /**
      * Invoked when 'viewBox(x,y,width,height)' has been parsed.
-     * @param x&nbsp;y&nbsp;width&nbsp;height the coordinates of the viewbox.
+     * @param x x coordinate of the viewbox
+     * @param y y coordinate of the viewbox
+     * @param width width of the viewbox
+     * @param height height of the viewbox
      * @exception ParseException if an error occured while processing the
      *                           fragment identifier
      */
diff --git a/sources/org/apache/batik/parser/FragmentIdentifierParser.java b/sources/org/apache/batik/parser/FragmentIdentifierParser.java
index 3ec2ca4..b6a1556 100644
--- a/sources/org/apache/batik/parser/FragmentIdentifierParser.java
+++ b/sources/org/apache/batik/parser/FragmentIdentifierParser.java
@@ -144,7 +144,7 @@
                 if (current != 'i') {
                     reportError("character.expected",
                                 new Object[] { new Character('i'),
-	         	                       new Integer(current) });
+                                                new Integer(current) });
                     break ident;
                 }
                 current = reader.read();
@@ -935,98 +935,98 @@
      * Returns the content of the buffer.
      */
     protected String getBufferContent() {
-	return new String(buffer, 0, bufferSize);
+        return new String(buffer, 0, bufferSize);
     }
 
     /**
      * Adds the current character to the buffer.
      */
     protected void bufferize() {
-	if (bufferSize >= buffer.length) {
-	    char[] t = new char[buffer.length * 2];
-	    for (int i = 0; i < bufferSize; i++) {
-		t[i] = buffer[i];
-	    }
-	    buffer = t;
-	}
-	buffer[bufferSize++] = (char)current;
+        if (bufferSize >= buffer.length) {
+            char[] t = new char[buffer.length * 2];
+            for (int i = 0; i < bufferSize; i++) {
+                t[i] = buffer[i];
+            }
+            buffer = t;
+        }
+        buffer[bufferSize++] = (char)current;
     }
 
     /**
      * Skips the whitespaces in the current reader.
      */
     protected void skipSpaces() throws IOException {
-	if (current == ',') {
+        if (current == ',') {
             current = reader.read();
-	}
+        }
     }
 
     /**
      * Skips the whitespaces and an optional comma.
      */
     protected void skipCommaSpaces() throws IOException {
-	if (current == ',') {
+        if (current == ',') {
             current = reader.read();
-	}
+        }
     }
 
     /**
      * Parses a matrix transform. 'm' is assumed to be the current character.
      */
     protected void parseMatrix() throws ParseException, IOException {
-	current = reader.read();
+        current = reader.read();
 
-	// Parse 'atrix wsp? ( wsp?'
-	if (current != 'a') {
-	    reportError("character.expected",
-			new Object[] { new Character('a'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 't') {
-	    reportError("character.expected",
-			new Object[] { new Character('t'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'r') {
-	    reportError("character.expected",
-			new Object[] { new Character('r'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'i') {
-	    reportError("character.expected",
-			new Object[] { new Character('i'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'x') {
-	    reportError("character.expected",
-			new Object[] { new Character('x'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	skipSpaces();
-	if (current != '(') {
-	    reportError("character.expected",
-			new Object[] { new Character('('),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	skipSpaces();
+        // Parse 'atrix wsp? ( wsp?'
+        if (current != 'a') {
+            reportError("character.expected",
+                        new Object[] { new Character('a'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 't') {
+            reportError("character.expected",
+                        new Object[] { new Character('t'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'r') {
+            reportError("character.expected",
+                        new Object[] { new Character('r'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'i') {
+            reportError("character.expected",
+                        new Object[] { new Character('i'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'x') {
+            reportError("character.expected",
+                        new Object[] { new Character('x'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        skipSpaces();
+        if (current != '(') {
+            reportError("character.expected",
+                        new Object[] { new Character('('),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        skipSpaces();
 
         float a = parseFloat();
         skipCommaSpaces();
@@ -1039,7 +1039,7 @@
         float e = parseFloat();
         skipCommaSpaces();
         float f = parseFloat();
-	
+        
         skipSpaces();
         if (current != ')') {
             reportError("character.expected",
@@ -1054,63 +1054,62 @@
 
     /**
      * Parses a rotate transform. 'r' is assumed to be the current character.
-     * @return the current character.
      */
     protected void parseRotate() throws ParseException, IOException {
-	current = reader.read();
+        current = reader.read();
 
-	// Parse 'otate wsp? ( wsp?'
-	if (current != 'o') {
-	    reportError("character.expected",
-			new Object[] { new Character('o'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 't') {
-	    reportError("character.expected",
-			new Object[] { new Character('t'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'a') {
-	    reportError("character.expected",
-			new Object[] { new Character('a'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 't') {
-	    reportError("character.expected",
-			new Object[] { new Character('t'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'e') {
-	    reportError("character.expected",
-			new Object[] { new Character('e'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	skipSpaces();
+        // Parse 'otate wsp? ( wsp?'
+        if (current != 'o') {
+            reportError("character.expected",
+                        new Object[] { new Character('o'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 't') {
+            reportError("character.expected",
+                        new Object[] { new Character('t'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'a') {
+            reportError("character.expected",
+                        new Object[] { new Character('a'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 't') {
+            reportError("character.expected",
+                        new Object[] { new Character('t'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'e') {
+            reportError("character.expected",
+                        new Object[] { new Character('e'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        skipSpaces();
 
-	if (current != '(') {
-	    reportError("character.expected",
-			new Object[] { new Character('('),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	skipSpaces();
+        if (current != '(') {
+            reportError("character.expected",
+                        new Object[] { new Character('('),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        skipSpaces();
 
         float theta = parseFloat();
         skipSpaces();
@@ -1143,86 +1142,85 @@
     /**
      * Parses a translate transform. 't' is assumed to be
      * the current character.
-     * @return the current character.
      */
     protected void parseTranslate() throws ParseException, IOException {
-	current = reader.read();
+        current = reader.read();
 
-	// Parse 'ranslate wsp? ( wsp?'
-	if (current != 'r') {
-	    reportError("character.expected",
-			new Object[] { new Character('r'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'a') {
-	    reportError("character.expected",
-			new Object[] { new Character('a'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'n') {
-	    reportError("character.expected",
-			new Object[] { new Character('n'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 's') {
-	    reportError("character.expected",
-			new Object[] { new Character('s'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'l') {
-	    reportError("character.expected",
-			new Object[] { new Character('l'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'a') {
-	    reportError("character.expected",
-			new Object[] { new Character('a'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 't') {
-	    reportError("character.expected",
-			new Object[] { new Character('t'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'e') {
-	    reportError("character.expected",
-			new Object[] { new Character('e'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	skipSpaces();
-	if (current != '(') {
-	    reportError("character.expected",
-			new Object[] { new Character('('),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	skipSpaces();
+        // Parse 'ranslate wsp? ( wsp?'
+        if (current != 'r') {
+            reportError("character.expected",
+                        new Object[] { new Character('r'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'a') {
+            reportError("character.expected",
+                        new Object[] { new Character('a'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'n') {
+            reportError("character.expected",
+                        new Object[] { new Character('n'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 's') {
+            reportError("character.expected",
+                        new Object[] { new Character('s'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'l') {
+            reportError("character.expected",
+                        new Object[] { new Character('l'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'a') {
+            reportError("character.expected",
+                        new Object[] { new Character('a'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 't') {
+            reportError("character.expected",
+                        new Object[] { new Character('t'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'e') {
+            reportError("character.expected",
+                        new Object[] { new Character('e'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        skipSpaces();
+        if (current != '(') {
+            reportError("character.expected",
+                        new Object[] { new Character('('),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        skipSpaces();
 
         float tx = parseFloat();
         skipSpaces();
@@ -1252,46 +1250,45 @@
 
     /**
      * Parses a scale transform. 'c' is assumed to be the current character.
-     * @return the current character.
      */
     protected void parseScale() throws ParseException, IOException {
-	current = reader.read();
+        current = reader.read();
 
-	// Parse 'ale wsp? ( wsp?'
-	if (current != 'a') {
-	    reportError("character.expected",
-			new Object[] { new Character('a'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'l') {
-	    reportError("character.expected",
-			new Object[] { new Character('l'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'e') {
-	    reportError("character.expected",
-			new Object[] { new Character('e'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	skipSpaces();
-	if (current != '(') {
-	    reportError("character.expected",
-			new Object[] { new Character('('),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	skipSpaces();
+        // Parse 'ale wsp? ( wsp?'
+        if (current != 'a') {
+            reportError("character.expected",
+                        new Object[] { new Character('a'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'l') {
+            reportError("character.expected",
+                        new Object[] { new Character('l'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'e') {
+            reportError("character.expected",
+                        new Object[] { new Character('e'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        skipSpaces();
+        if (current != '(') {
+            reportError("character.expected",
+                        new Object[] { new Character('('),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        skipSpaces();
 
         float sx = parseFloat();
         skipSpaces();
@@ -1321,53 +1318,52 @@
 
     /**
      * Parses a skew transform. 'e' is assumed to be the current character.
-     * @return the current character.
      */
     protected void parseSkew() throws ParseException, IOException {
-	current = reader.read();
+        current = reader.read();
 
-	// Parse 'ew[XY] wsp? ( wsp?'
-	if (current != 'e') {
-	    reportError("character.expected",
-			new Object[] { new Character('e'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	if (current != 'w') {
-	    reportError("character.expected",
-			new Object[] { new Character('w'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
+        // Parse 'ew[XY] wsp? ( wsp?'
+        if (current != 'e') {
+            reportError("character.expected",
+                        new Object[] { new Character('e'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        if (current != 'w') {
+            reportError("character.expected",
+                        new Object[] { new Character('w'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
 
-	boolean skewX = false;
-	switch (current) {
-	case 'X':
-	    skewX = true;
-	case 'Y':
-	    break;
-	default:
-	    reportError("character.expected",
-			new Object[] { new Character('X'),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	skipSpaces();
-	if (current != '(') {
-	    reportError("character.expected",
-			new Object[] { new Character('('),
-				       new Integer(current) });
-	    skipTransform();
-	    return;
-	}
-	current = reader.read();
-	skipSpaces();
+        boolean skewX = false;
+        switch (current) {
+        case 'X':
+            skewX = true;
+        case 'Y':
+            break;
+        default:
+            reportError("character.expected",
+                        new Object[] { new Character('X'),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        skipSpaces();
+        if (current != '(') {
+            reportError("character.expected",
+                        new Object[] { new Character('('),
+                                       new Integer(current) });
+            skipTransform();
+            return;
+        }
+        current = reader.read();
+        skipSpaces();
 
         float sk = parseFloat();
 
@@ -1389,20 +1385,19 @@
 
     /**
      * Skips characters in the given reader until a ')' is encountered.
-     * @return the first character after the ')'.
      */
     protected void skipTransform() throws IOException {
-	loop: for (;;) {
-	    current = reader.read();
-	    switch (current) {
-	    case ')':
-		break loop;
-	    default:
-		if (current == -1) {
-		    break loop;
-		}
-	    }
-	}
+        loop: for (;;) {
+            current = reader.read();
+            switch (current) {
+                case ')':
+                    break loop;
+                default:
+                    if (current == -1) {
+                        break loop;
+                    }
+            }
+        }
     }
 
     /**
@@ -1410,37 +1405,37 @@
      */
     protected void parsePreserveAspectRatio()
         throws ParseException, IOException {
-	fragmentIdentifierHandler.startPreserveAspectRatio();
+        fragmentIdentifierHandler.startPreserveAspectRatio();
 
         align: switch (current) {
         case 'n':
-	    current = reader.read();
-	    if (current != 'o') {
-		reportError("character.expected",
-			    new Object[] { new Character('o'),
+            current = reader.read();
+            if (current != 'o') {
+                reportError("character.expected",
+                            new Object[] { new Character('o'),
                                            new Integer(current) });
-		skipIdentifier();
-		break align;
-	    }
-	    current = reader.read();
-	    if (current != 'n') {
-		reportError("character.expected",
-			    new Object[] { new Character('n'),
-					   new Integer(current) });
-		skipIdentifier();
-		break align;
-	    }
-	    current = reader.read();
-	    if (current != 'e') {
-		reportError("character.expected",
-			    new Object[] { new Character('e'),
-					   new Integer(current) });
-		skipIdentifier();
-		break align;
-	    }
-	    current = reader.read();
-	    skipSpaces();
-	    fragmentIdentifierHandler.none();
+                skipIdentifier();
+                break align;
+            }
+            current = reader.read();
+            if (current != 'n') {
+                reportError("character.expected",
+                            new Object[] { new Character('n'),
+                                           new Integer(current) });
+                skipIdentifier();
+                break align;
+            }
+            current = reader.read();
+            if (current != 'e') {
+                reportError("character.expected",
+                            new Object[] { new Character('e'),
+                                           new Integer(current) });
+                skipIdentifier();
+                break align;
+            }
+            current = reader.read();
+            skipSpaces();
+            fragmentIdentifierHandler.none();
             break;
                 
         case 'x':
@@ -1448,7 +1443,7 @@
             if (current != 'M') {
                 reportError("character.expected",
                             new Object[] { new Character('M'),
-					   new Integer(current) });
+                                           new Integer(current) });
                 skipIdentifier();
                 break;
             }
@@ -1459,7 +1454,7 @@
                 if (current != 'x') {
                     reportError("character.expected",
                                 new Object[] { new Character('x'),
-			          	       new Integer(current) });
+                                                 new Integer(current) });
                     skipIdentifier();
                     break align;
                 }
@@ -1467,7 +1462,7 @@
                 if (current != 'Y') {
                     reportError("character.expected",
                                 new Object[] { new Character('Y'),
-					       new Integer(current) });
+                                               new Integer(current) });
                     skipIdentifier();
                     break align;
                 }
@@ -1475,7 +1470,7 @@
                 if (current != 'M') {
                     reportError("character.expected",
                                 new Object[] { new Character('M'),
-					       new Integer(current) });
+                                               new Integer(current) });
                     skipIdentifier();
                     break align;
                 }
@@ -1486,7 +1481,7 @@
                     if (current != 'x') {
                         reportError("character.expected",
                                     new Object[] { new Character('x'),
-						   new Integer(current) });
+                                                   new Integer(current) });
                         skipIdentifier();
                         break align;
                     }
@@ -1520,7 +1515,7 @@
                     if (current != 'Y') {
                         reportError("character.expected",
                                     new Object[] { new Character('Y'),
-						   new Integer(current) });
+                                                   new Integer(current) });
                         skipIdentifier();
                         break align;
                     }
@@ -1528,7 +1523,7 @@
                     if (current != 'M') {
                         reportError("character.expected",
                                     new Object[] { new Character('M'),
-						   new Integer(current) });
+                                                   new Integer(current) });
                         skipIdentifier();
                         break align;
                     }
@@ -1541,8 +1536,8 @@
                                 ("character.expected",
                                  new Object[] { new Character('x'),
                                                     new Integer(current) });
-			    skipIdentifier();
-			    break align;
+                            skipIdentifier();
+                            break align;
                         }
                         fragmentIdentifierHandler.xMidYMax();
                         current = reader.read();
@@ -1551,18 +1546,18 @@
                         current = reader.read();
                         switch (current) {
                         case 'd':
-			    fragmentIdentifierHandler.xMidYMid();
-			    current = reader.read();
-			    break;
+                            fragmentIdentifierHandler.xMidYMid();
+                            current = reader.read();
+                            break;
                         case 'n':
                             fragmentIdentifierHandler.xMidYMin();
                             current = reader.read();
                             break;
-			default:
-			    reportError("character.unexpected",
-					new Object[] { new Integer(current) });
-			    skipIdentifier();
-			    break align;
+                        default:
+                            reportError("character.unexpected",
+                                        new Object[] { new Integer(current) });
+                            skipIdentifier();
+                            break align;
                         }
                     }
                     break;
@@ -1571,7 +1566,7 @@
                     if (current != 'Y') {
                         reportError("character.expected",
                                     new Object[] { new Character('Y'),
-					           new Integer(current) });
+                                                   new Integer(current) });
                         skipIdentifier();
                         break align;
                     }
@@ -1579,7 +1574,7 @@
                     if (current != 'M') {
                         reportError("character.expected",
                                     new Object[] { new Character('M'),
-						   new Integer(current) });
+                                                   new Integer(current) });
                         skipIdentifier();
                         break align;
                     }
@@ -1647,7 +1642,7 @@
             if (current != 'e') {
                 reportError("character.expected",
                             new Object[] { new Character('e'),
-				           new Integer(current) });
+                                           new Integer(current) });
                 skipIdentifier();
                 break;
             }
@@ -1655,7 +1650,7 @@
             if (current != 'e') {
                 reportError("character.expected",
                             new Object[] { new Character('e'),
-			         	   new Integer(current) });
+                                            new Integer(current) });
                 skipIdentifier();
                 break;
             }
@@ -1663,7 +1658,7 @@
             if (current != 't') {
                 reportError("character.expected",
                             new Object[] { new Character('t'),
-	        			   new Integer(current) });
+                                           new Integer(current) });
                 skipIdentifier();
                 break;
             }
@@ -1675,7 +1670,7 @@
             if (current != 'l') {
                 reportError("character.expected",
                             new Object[] { new Character('l'),
-				           new Integer(current) });
+                                           new Integer(current) });
                 skipIdentifier();
                 break;
             }
@@ -1683,7 +1678,7 @@
             if (current != 'i') {
                 reportError("character.expected",
                             new Object[] { new Character('i'),
-					   new Integer(current) });
+                                           new Integer(current) });
                 skipIdentifier();
                 break;
             }
@@ -1691,7 +1686,7 @@
             if (current != 'c') {
                 reportError("character.expected",
                             new Object[] { new Character('c'),
-			        	   new Integer(current) });
+                                           new Integer(current) });
                 skipIdentifier();
                 break;
             }
@@ -1699,7 +1694,7 @@
             if (current != 'e') {
                 reportError("character.expected",
                             new Object[] { new Character('e'),
-					   new Integer(current) });
+                                           new Integer(current) });
                 skipIdentifier();
                 break;
             }
@@ -1707,22 +1702,21 @@
             current = reader.read();
         }
 
-	fragmentIdentifierHandler.endPreserveAspectRatio();
+        fragmentIdentifierHandler.endPreserveAspectRatio();
     }
 
     /**
      * Skips characters in the given reader until a white space is encountered.
-     * @return the first character after the space.
      */
     protected void skipIdentifier() throws IOException {
-	loop: for (;;) {
-	    current = reader.read();
-	    switch(current) {
-	    case 0xD: case 0xA: case 0x20: case 0x9:
-		current = reader.read();
-            case -1:
-                break loop;
-	    }
-	}
+        loop: for (;;) {
+          current = reader.read();
+          switch(current) {
+              case 0xD: case 0xA: case 0x20: case 0x9:
+                  current = reader.read();
+              case -1:
+                  break loop;
+          }
+      }
     }
 }
diff --git a/sources/org/apache/batik/parser/NumberListHandler.java b/sources/org/apache/batik/parser/NumberListHandler.java
index a6c174c..44bad58 100644
--- a/sources/org/apache/batik/parser/NumberListHandler.java
+++ b/sources/org/apache/batik/parser/NumberListHandler.java
@@ -14,11 +14,14 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
- */package org.apache.batik.parser;
+ */
+package org.apache.batik.parser;
 
 /**
+ * An handler interface for parsing NumberLists.
  *
  * @author  tonny@kiyut.com
+ * @version $Id$
  */
 public interface NumberListHandler {
     /**
diff --git a/sources/org/apache/batik/parser/NumberParser.java b/sources/org/apache/batik/parser/NumberParser.java
index 9e3254f..5a581be 100755
--- a/sources/org/apache/batik/parser/NumberParser.java
+++ b/sources/org/apache/batik/parser/NumberParser.java
@@ -218,7 +218,7 @@
             return 0f;
         }
 
-        if (exp >  128) {
+        if (exp >=  128) {
             return (mant > 0)
                 ? Float.POSITIVE_INFINITY
                 : Float.NEGATIVE_INFINITY;
@@ -228,7 +228,7 @@
             return mant;
         }
             
-        if (mant >= 1 << 26) {
+        if (mant >= (1 << 26)) {
             mant++;  // round up trailing bits if they will be dropped.
         }
 
diff --git a/sources/org/apache/batik/parser/PathHandler.java b/sources/org/apache/batik/parser/PathHandler.java
index 14a1c11..d8522d3 100644
--- a/sources/org/apache/batik/parser/PathHandler.java
+++ b/sources/org/apache/batik/parser/PathHandler.java
@@ -41,7 +41,8 @@
     /**
      * Invoked when a relative moveto command has been parsed.
      * <p>Command : <b>m</b>
-     * @param x,&nbsp;y the relative coordinates for the end point
+     * @param x the relative x coordinate for the end point
+     * @param y the relative y coordinate for the end point
      * @exception ParseException if an error occured while processing the path
      */
     void movetoRel(float x, float y) throws ParseException;
@@ -49,7 +50,8 @@
     /**
      * Invoked when an absolute moveto command has been parsed.
      * <p>Command : <b>M</b>
-     * @param x,&nbsp;y the absolute coordinates for the end point
+     * @param x the absolute x coordinate for the end point
+     * @param y the absolute y coordinate for the end point
      * @exception ParseException if an error occured while processing the path
      */
     void movetoAbs(float x, float y) throws ParseException;
@@ -64,7 +66,8 @@
     /**
      * Invoked when a relative line command has been parsed.
      * <p>Command : <b>l</b>
-     * @param x,&nbsp;y the relative coordinates for the end point
+     * @param x the relative x coordinates for the end point
+     * @param y the relative y coordinates for the end point
      * @exception ParseException if an error occured while processing the path
      */
     void linetoRel(float x, float y) throws ParseException;
@@ -72,7 +75,8 @@
     /**
      * Invoked when an absolute line command has been parsed.
      * <p>Command : <b>L</b>
-     * @param x,&nbsp;y the absolute coordinates for the end point
+     * @param x the absolute x coordinate for the end point
+     * @param y the absolute y coordinate for the end point
      * @exception ParseException if an error occured while processing the path
      */
     void linetoAbs(float x, float y) throws ParseException;
@@ -112,9 +116,12 @@
     /**
      * Invoked when a relative cubic bezier curve command has been parsed.
      * <p>Command : <b>c</b>
-     * @param x1,&nbsp;y1 the relative coordinates for the first control point
-     * @param x2,&nbsp;y2 the relative coordinates for the second control point
-     * @param x,&nbsp;y the relative coordinates for the end point
+     * @param x1 the relative x coordinate for the first control point
+     * @param y1 the relative y coordinate for the first control point
+     * @param x2 the relative x coordinate for the second control point
+     * @param y2 the relative y coordinate for the second control point
+     * @param x the relative x coordinate for the end point
+     * @param y the relative y coordinate for the end point
      * @exception ParseException if an error occured while processing the path
      */
     void curvetoCubicRel(float x1, float y1, 
@@ -125,9 +132,12 @@
     /**
      * Invoked when an absolute cubic bezier curve command has been parsed.
      * <p>Command : <b>C</b>
-     * @param x1,&nbsp;y1 the absolute coordinates for the first control point
-     * @param x2,&nbsp;y2 the absolute coordinates for the second control point
-     * @param x,&nbsp;y the absolute coordinates for the end point
+     * @param x1 the absolute x coordinate for the first control point
+     * @param y1 the absolute y coordinate for the first control point
+     * @param x2 the absolute x coordinate for the second control point
+     * @param y2 the absolute y coordinate for the second control point
+     * @param x the absolute x coordinate for the end point
+     * @param y the absolute y coordinate for the end point
      * @exception ParseException if an error occured while processing the path
      */
     void curvetoCubicAbs(float x1, float y1, 
@@ -140,8 +150,10 @@
      * reflection of the second control point on the previous command
      * relative to the current point.
      * <p>Command : <b>s</b>
-     * @param x2,&nbsp;y2 the relative coordinates for the second control point
-     * @param x,&nbsp;y the relative coordinates for the end point
+     * @param x2 the relative x coordinate for the second control point
+     * @param y2 the relative y coordinate for the second control point
+     * @param x the relative x coordinate for the end point
+     * @param y the relative y coordinate for the end point
      * @exception ParseException if an error occured while processing the path
      */
     void curvetoCubicSmoothRel(float x2, float y2, 
@@ -153,8 +165,10 @@
      * reflection of the second control point on the previous command
      * relative to the current point.
      * <p>Command : <b>S</b>
-     * @param x2,&nbsp;y2 the absolute coordinates for the second control point
-     * @param x,&nbsp;y the absolute coordinates for the end point 
+     * @param x2 the absolute x coordinate for the second control point
+     * @param y2 the absolute y coordinate for the second control point
+     * @param x the absolute x coordinate for the end point
+     * @param y the absolute y coordinate for the end point
      * @exception ParseException if an error occured while processing the path
      */
     void curvetoCubicSmoothAbs(float x2, float y2, 
@@ -163,8 +177,10 @@
     /**
      * Invoked when a relative quadratic bezier curve command has been parsed.
      * <p>Command : <b>q</b>
-     * @param x1,&nbsp;y1 the relative coordinates for the control point
-     * @param x,&nbsp;y the relative coordinates for the end point
+     * @param x1 the relative x coordinate for the control point
+     * @param y1 the relative y coordinate for the control point
+     * @param x the relative x coordinate for the end point
+     * @param y the relative x coordinate for the end point
      * @exception ParseException if an error occured while processing the path
      */
     void curvetoQuadraticRel(float x1, float y1, 
@@ -173,8 +189,10 @@
     /**
      * Invoked when an absolute quadratic bezier curve command has been parsed.
      * <p>Command : <b>Q</b>
-     * @param x1,&nbsp;y1 the absolute coordinates for the control point
-     * @param x,&nbsp;y the absolute coordinates for the end point
+     * @param x1 the absolute x coordinate for the control point
+     * @param y1 the absolute y coordinate for the control point
+     * @param x the absolute x coordinate for the end point
+     * @param y the absolute x coordinate for the end point
      * @exception ParseException if an error occured while processing the path
      */
     void curvetoQuadraticAbs(float x1, float y1, 
@@ -186,7 +204,8 @@
      * reflection of the control point on the previous command
      * relative to the current point.
      * <p>Command : <b>t</b>
-     * @param x,&nbsp;y the relative coordinates for the end point 
+     * @param x the relative x coordinate for the end point 
+     * @param y the relative y coordinate for the end point 
      * @exception ParseException if an error occured while processing the path
      */
     void curvetoQuadraticSmoothRel(float x, float y) throws ParseException;
@@ -197,7 +216,8 @@
      * reflection of the control point on the previous command
      * relative to the current point.
      * <p>Command : <b>T</b>
-     * @param x,&nbsp;y the absolute coordinates for the end point 
+     * @param x the absolute x coordinate for the end point 
+     * @param y the absolute y coordinate for the end point 
      * @exception ParseException if an error occured while processing the path
      */
     void curvetoQuadraticSmoothAbs(float x, float y) throws ParseException;
@@ -207,11 +227,12 @@
      * <p>Command : <b>a</b>
      * @param rx the X axis radius for the ellipse
      * @param ry the Y axis radius for the ellipse 
-     * @param angle the rotation angle in degrees for the ellipse's X-axis
-     * relative to the X-axis
+     * @param xAxisRotation the rotation angle in degrees for the ellipse's
+     *                      X-axis relative to the X-axis
      * @param largeArcFlag the value of the large-arc-flag 
      * @param sweepFlag the value of the sweep-flag 
-     * @param x,&nbsp;y the relative coordinates for the end point
+     * @param x the relative x coordinate for the end point 
+     * @param y the relative y coordinate for the end point 
      * @exception ParseException if an error occured while processing the path
      */
     void arcRel(float rx, float ry, 
@@ -225,11 +246,12 @@
      * <p>Command : <b>A</b>
      * @param rx the X axis radius for the ellipse
      * @param ry the Y axis radius for the ellipse 
-     * @param angle the rotation angle in degrees for the ellipse's X-axis
-     * relative to the X-axis
+     * @param xAxisRotation the rotation angle in degrees for the ellipse's
+     *                      X-axis relative to the X-axis
      * @param largeArcFlag the value of the large-arc-flag 
      * @param sweepFlag the value of the sweep-flag 
-     * @param x,&nbsp;y the absolute coordinates for the end point
+     * @param x the absolute x coordinate for the end point 
+     * @param y the absolute y coordinate for the end point 
      * @exception ParseException if an error occured while processing the path
      */
     void arcAbs(float rx, float ry, 
diff --git a/sources/org/apache/batik/parser/PointsHandler.java b/sources/org/apache/batik/parser/PointsHandler.java
index 55e036a..cbcb1f8 100644
--- a/sources/org/apache/batik/parser/PointsHandler.java
+++ b/sources/org/apache/batik/parser/PointsHandler.java
@@ -35,7 +35,8 @@
 
     /**
      * Invoked when a point has been parsed.
-     * @param x,&nbsp;y the coordinates of the point
+     * @param x the x coordinate of the point
+     * @param y the y coordinate of the point
      * @exception ParseException if an error occured while processing the
      *                           points
      */
diff --git a/sources/org/apache/batik/parser/UnitProcessor.java b/sources/org/apache/batik/parser/UnitProcessor.java
index ddb62ac..982b06c 100644
--- a/sources/org/apache/batik/parser/UnitProcessor.java
+++ b/sources/org/apache/batik/parser/UnitProcessor.java
@@ -77,7 +77,7 @@
      * Returns the specified value with the specified direction in
      * objectBoundingBox units.
      *
-     * @param s the value
+     * @param value the value
      * @param type the type of the value
      * @param d the direction of the value
      * @param ctx the context used to resolve relative value
diff --git a/sources/org/apache/batik/script/InterpreterException.java b/sources/org/apache/batik/script/InterpreterException.java
index ec556c6..39ae685 100644
--- a/sources/org/apache/batik/script/InterpreterException.java
+++ b/sources/org/apache/batik/script/InterpreterException.java
@@ -32,7 +32,7 @@
      * Builds an instance of <code>InterpreterException</code>.
      * @param message the <code>Exception</code> message.
      * @param lineno the number of the line the error occurs.
-     * @param columno the number of the column the error occurs.
+     * @param columnno the number of the column the error occurs.
      */
     public InterpreterException(String message, int lineno, int columnno) {
         super(message);
@@ -45,7 +45,7 @@
      * @param exception the embedded exception.
      * @param message the <code>Exception</code> message.
      * @param lineno the number of the line the error occurs.
-     * @param columno the number of the column the error occurs.
+     * @param columnno the number of the column the error occurs.
      */
     public InterpreterException(Exception exception,
                                 String message, int lineno, int columnno) {
diff --git a/sources/org/apache/batik/script/InterpreterPool.java b/sources/org/apache/batik/script/InterpreterPool.java
index ad27853..2960ba2 100644
--- a/sources/org/apache/batik/script/InterpreterPool.java
+++ b/sources/org/apache/batik/script/InterpreterPool.java
@@ -96,13 +96,14 @@
      */
     public Interpreter createInterpreter(Document document, String language) {
         InterpreterFactory factory = (InterpreterFactory)factories.get(language);
-        Interpreter interpreter = null;
-        if (factory != null)
-            interpreter = factory.createInterpreter
+        if (factory == null) return null;
+
+        Interpreter interpreter = factory.createInterpreter
                 (((SVGOMDocument)document).getURLObject());
-        if (document != null) {
+        if (interpreter == null) return null;
+
+        if (document != null)
             interpreter.bindObject(BIND_NAME_DOCUMENT, document);
-        }
 
         return interpreter;
     }
diff --git a/sources/org/apache/batik/script/jpython/JPythonInterpreter.java b/sources/org/apache/batik/script/jpython/JPythonInterpreter.java
index fc03046..c80ba89 100755
--- a/sources/org/apache/batik/script/jpython/JPythonInterpreter.java
+++ b/sources/org/apache/batik/script/jpython/JPythonInterpreter.java
@@ -24,7 +24,6 @@
 
 import org.apache.batik.script.InterpreterException;
 import org.python.util.PythonInterpreter;
-;
 
 /**
  * A simple implementation of <code>Interpreter</code> interface to use
diff --git a/sources/org/apache/batik/script/rhino/EventTargetWrapper.java b/sources/org/apache/batik/script/rhino/EventTargetWrapper.java
index 5a4fe6d..a2be730 100755
--- a/sources/org/apache/batik/script/rhino/EventTargetWrapper.java
+++ b/sources/org/apache/batik/script/rhino/EventTargetWrapper.java
@@ -55,8 +55,8 @@
      * The Java function object calling the Rhino function.
      */
     static class FunctionEventListener implements EventListener {
-        private Function function;
-        private RhinoInterpreter interpreter;
+        protected Function function;
+        protected RhinoInterpreter interpreter;
         FunctionEventListener(Function f, RhinoInterpreter i) {
             function = f;
             interpreter = i;
@@ -75,11 +75,11 @@
     }
 
     static class HandleEventListener implements EventListener {
-        private final static String HANDLE_EVENT = "handleEvent";
+        public final static String HANDLE_EVENT = "handleEvent";
 
-        private Scriptable scriptable;
-        private Object[] array = new Object[1];
-        private RhinoInterpreter interpreter;
+        public Scriptable scriptable;
+        public Object[] array = new Object[1];
+        public RhinoInterpreter interpreter;
 
         HandleEventListener(Scriptable s, RhinoInterpreter interpreter) {
             scriptable = s;
@@ -190,11 +190,13 @@
      * cases.
      */
     static class FunctionAddProxy extends FunctionProxy {
-        private Map listenerMap;
-
-        FunctionAddProxy(Function delegate, Map listenerMap) {
+        protected Map              listenerMap;
+        protected RhinoInterpreter interpreter;
+        FunctionAddProxy(RhinoInterpreter interpreter,
+                         Function delegate, Map listenerMap) {
             super(delegate);
             this.listenerMap = listenerMap;
+            this.interpreter = interpreter;
         }
 
         public Object call(Context ctx, Scriptable scope,
@@ -203,8 +205,7 @@
             NativeJavaObject  njo = (NativeJavaObject)thisObj;
             if (args[1] instanceof Function) {
                 EventListener evtListener = new FunctionEventListener
-                    ((Function)args[1],
-                     ((RhinoInterpreter.ExtendedContext)ctx).getInterpreter());
+                    ((Function)args[1], interpreter);
                 listenerMap.put(args[1], new SoftReference(evtListener));
                 // we need to marshall args
                 Class[] paramTypes = { String.class, Function.class,
@@ -219,8 +220,7 @@
             if (args[1] instanceof NativeObject) {
                 EventListener evtListener =
                     new HandleEventListener((Scriptable)args[1],
-                                            ((RhinoInterpreter.ExtendedContext)
-                                             ctx).getInterpreter());
+                                            interpreter);
                 listenerMap.put(args[1], new SoftReference(evtListener));
                 // we need to marshall args
                 Class[] paramTypes = { String.class, Scriptable.class,
@@ -237,7 +237,7 @@
     }
 
     static class FunctionRemoveProxy extends FunctionProxy {
-        private Map listenerMap;
+        public Map listenerMap;
 
         FunctionRemoveProxy(Function delegate, Map listenerMap) {
             super(delegate);
@@ -286,11 +286,14 @@
     }
 
     static class FunctionAddNSProxy extends FunctionProxy {
-        private Map listenerMap;
+        protected Map              listenerMap;
+        protected RhinoInterpreter interpreter;
 
-        FunctionAddNSProxy(Function delegate, Map listenerMap) {
+        FunctionAddNSProxy(RhinoInterpreter interpreter,
+                           Function delegate, Map listenerMap) {
             super(delegate);
             this.listenerMap = listenerMap;
+            this.interpreter = interpreter;
         }
 
         public Object call(Context ctx, Scriptable scope,
@@ -299,8 +302,7 @@
             NativeJavaObject  njo = (NativeJavaObject)thisObj;
             if (args[2] instanceof Function) {
                 EventListener evtListener = new FunctionEventListener
-                    ((Function)args[2],
-                     ((RhinoInterpreter.ExtendedContext)ctx).getInterpreter());
+                    ((Function)args[2], interpreter);
                 listenerMap.put(args[2], new SoftReference(evtListener));
                 // we need to marshall args
                 Class[] paramTypes = { String.class, String.class,
@@ -319,9 +321,7 @@
             }
             if (args[2] instanceof NativeObject) {
                 EventListener evtListener =
-                    new HandleEventListener((Scriptable)args[2],
-                                            ((RhinoInterpreter.ExtendedContext)
-                                             ctx).getInterpreter());
+                    new HandleEventListener((Scriptable)args[2], interpreter);
                 listenerMap.put(args[2], new SoftReference(evtListener));
                 // we need to marshall args
                 Class[] paramTypes = { String.class, String.class,
@@ -343,7 +343,7 @@
     }
 
     static class FunctionRemoveNSProxy extends FunctionProxy {
-        private Map listenerMap;
+        protected Map listenerMap;
 
         FunctionRemoveNSProxy(Function delegate, Map listenerMap) {
             super(delegate);
@@ -402,20 +402,22 @@
     // the keys are the underlying Java object, in order
     // to remove potential memory leaks use a WeakHashMap to allow
     // to collect entries as soon as the underlying Java object is
-    // not anymore available.
-    private static WeakHashMap mapOfListenerMap;
+    // not available anymore.
+    protected static WeakHashMap mapOfListenerMap;
 
-    private final static String ADD_NAME      = "addEventListener";
-    private final static String ADDNS_NAME    = "addEventListenerNS";
-    private final static String REMOVE_NAME   = "removeEventListener";
-    private final static String REMOVENS_NAME = "removeEventListenerNS";
-    private final static Class[] ARGS_TYPE = { String.class,
+    public final static String ADD_NAME      = "addEventListener";
+    public final static String ADDNS_NAME    = "addEventListenerNS";
+    public final static String REMOVE_NAME   = "removeEventListener";
+    public final static String REMOVENS_NAME = "removeEventListenerNS";
+    public final static Class[] ARGS_TYPE = { String.class,
                                                EventListener.class,
                                                Boolean.TYPE };
-    private final static String NAME = "name";
 
-    EventTargetWrapper(Scriptable scope, EventTarget object) {
+    protected RhinoInterpreter interpreter;
+    EventTargetWrapper(Scriptable scope, EventTarget object,
+                       RhinoInterpreter interpreter) {
         super(scope, object, null);
+        this.interpreter = interpreter;
     }
 
     /**
@@ -426,13 +428,16 @@
         if (name.equals(ADD_NAME)) {
             // prevent creating a Map for all JavaScript objects
             // when we need it only from time to time...
-            method = new FunctionAddProxy((Function)method, initMap());
+            method = new FunctionAddProxy(interpreter, 
+                                          (Function)method, initMap());
         } else if (name.equals(REMOVE_NAME)) {
             // prevent creating a Map for all JavaScript objects
             // when we need it only from time to time...
-            method = new FunctionRemoveProxy((Function)method, initMap());
+            method = new FunctionRemoveProxy
+                ((Function)method, initMap());
         } else if (name.equals(ADDNS_NAME)) {
-            method = new FunctionAddNSProxy((Function) method, initMap());
+            method = new FunctionAddNSProxy(interpreter,
+                                            (Function) method, initMap());
         } else if (name.equals(REMOVENS_NAME)) {
             method = new FunctionRemoveNSProxy((Function) method, initMap());
         }
diff --git a/sources/org/apache/batik/script/rhino/RhinoClassShutter.java b/sources/org/apache/batik/script/rhino/RhinoClassShutter.java
index c3d3aa5..4c9585f 100644
--- a/sources/org/apache/batik/script/rhino/RhinoClassShutter.java
+++ b/sources/org/apache/batik/script/rhino/RhinoClassShutter.java
@@ -24,7 +24,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class RhinoClassShutter implements ClassShutter {
diff --git a/sources/org/apache/batik/script/rhino/RhinoInterpreter.java b/sources/org/apache/batik/script/rhino/RhinoInterpreter.java
index ba64cb9..eabe876 100755
--- a/sources/org/apache/batik/script/rhino/RhinoInterpreter.java
+++ b/sources/org/apache/batik/script/rhino/RhinoInterpreter.java
@@ -28,9 +28,8 @@
 import java.security.PrivilegedAction;
 import java.util.Iterator;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.Locale;
-import java.util.Map;
-import java.util.HashMap;
 
 import org.apache.batik.bridge.InterruptedBridgeException;
 import org.apache.batik.script.Interpreter;
@@ -103,8 +102,7 @@
 
     private ScriptableObject globalObject = null;
     private LinkedList compiledScripts = new LinkedList();
-    private WrapFactory wrapFactory =
-        new BatikWrapFactory(this);
+    private WrapFactory wrapFactory = new BatikWrapFactory(this);
 
     /**
      * The Rhino 'security domain'. We use the RhinoClassLoader
@@ -122,6 +120,18 @@
         = new BatikSecurityController();
 
     /**
+     * Default Context for scripts. This is used only for efficiency
+     * reason.
+     */
+    protected Context defaultContext;
+
+    /**
+     * Context vector, to make sure we are not
+     * setting the security context too many times
+     */
+    protected List contexts = new LinkedList();
+
+    /**
      * Build a <code>Interpreter</code> for ECMAScript using Rhino.
      *
      * @param documentURL the URL for the document which references
@@ -180,15 +190,23 @@
      * on the context.
      */
     public Context enterContext(){
-        Context ctx = Context.getCurrentContext();
-        if (ctx == null) {
-            ctx = new ExtendedContext();
+        Context ctx = Context.enter();
+        if (ctx == defaultContext)
+            return ctx;
+
+        if (!contexts.contains(ctx)) {
             ctx.setWrapFactory(wrapFactory);
             ctx.setSecurityController(securityController);
             ctx.setClassShutter(new RhinoClassShutter());
-        }
-        ctx = Context.enter(ctx);
 
+            // No class loader so don't try and optmize.
+            if (rhinoClassLoader == null) {
+                ctx.setOptimizationLevel(-1);
+                ctx.setCachingEnabled(false);
+            }
+            contexts.add(ctx);
+        }
+        defaultContext = ctx;
         return ctx;
     }
 
@@ -352,11 +370,14 @@
     }
 
     /**
-     * For <code>RhinoInterpreter</code> this method does nothing.
+     * For <code>RhinoInterpreter</code> this method flushes the
+     * Rhino caches to avoid memory leaks.
      */
     public void dispose() {
-        Context.setCachingEnabled(false);
-        Context.setCachingEnabled(true);
+        if (rhinoClassLoader != null) {
+            Context.setCachingEnabled(false);
+            Context.setCachingEnabled(true);
+        }
     }
 
     /**
@@ -369,66 +390,22 @@
         enterContext();
         try {
             if (name.equals(BIND_NAME_WINDOW) && object instanceof Window) {
+                ((WindowWrapper)globalObject).window = (Window)object;
                 window = (Window)object;
                 object = globalObject;
             }
-            try {
                 Scriptable jsObject;
                 jsObject = Context.toObject(object, globalObject);
-                objects.put(name, jsObject);
-                if (ScriptableObject.getProperty(globalObject, name) ==
-                    ScriptableObject.NOT_FOUND)
-                    globalObject.defineProperty
-                        (name, new RhinoGetDelegate(name),
-                         rhinoGetter, null, ScriptableObject.READONLY);
-            } catch (PropertyException pe) {
-                pe.printStackTrace();
-            }
+            globalObject.put(name, globalObject, jsObject);
         } finally {
             Context.exit();
         }
     }
-    /**
-     * HashTable to store properties bounds on the global object.
-     * So they don't end up in the JavaMethods static table.
-     */
-    Map objects = new HashMap(4);
-
-    /**
-     * Class to act as 'get' delegate for Rhino.  This uses the
-     * currentContext to get the current Interpreter object which
-     * allows it to lookup the object requested.  This gets around the
-     * fact that the global object gets referenced from a static
-     * context but the Context does not.
-     */
-    public static class RhinoGetDelegate {
-        String name;
-        RhinoGetDelegate(String name) {
-            this.name = name;
-        }
-        public Object get(ScriptableObject so) {
-            Context ctx = Context.getCurrentContext();
-            if (ctx == null ) return null;
-            return ((ExtendedContext)ctx).getInterpreter().objects.get(name);
-        }
-    }
-    // The method to use for getting the value from the
-    // RhinoGetDelegate.
-    static Method rhinoGetter;
-    static {
-        try {
-            Class [] getterArgs = { ScriptableObject.class };
-            rhinoGetter = RhinoGetDelegate.class.getDeclaredMethod
-                ("get", getterArgs);
-        } catch (NoSuchMethodException nsm) { }
-    }
-
 
     /**
      * To be used by <code>EventTargetWrapper</code>.
      */
-    void callHandler(Function handler,
-                     Object arg)
+    void callHandler(Function handler, Object arg)
         throws JavaScriptException {
         Context ctx = enterContext();
         try {
@@ -494,13 +471,13 @@
      * Build the wrapper for objects implement <code>EventTarget</code>.
      */
     Scriptable buildEventTargetWrapper(EventTarget obj) {
-        return new EventTargetWrapper(globalObject, obj);
+        return new EventTargetWrapper(globalObject, obj, this);
     }
 
     /**
      * By default Rhino has no output method in its language. That's why
      * this method does nothing.
-     * @param output the new out <code>Writer</code>.
+     * @param out the new out <code>Writer</code>.
      */
     public void setOut(Writer out) {
         // no implementation of a default output function in Rhino
@@ -509,10 +486,8 @@
     // org.apache.batik.i18n.Localizable implementation
 
     /**
-     * Provides a way to the user to specify a locale which override the
-     * default one. If null is passed to this method, the used locale
-     * becomes the global one.
-     * @param l The locale to set.
+     * Returns the current locale or null if the locale currently used is
+     * the default one.
      */
     public Locale getLocale() {
         // <!> TODO : in Rhino the local is for a thread not a scope..
@@ -520,8 +495,10 @@
     }
 
     /**
-     * Returns the current locale or null if the locale currently used is
-     * the default one.
+     * Provides a way to the user to specify a locale which override the
+     * default one. If null is passed to this method, the used locale
+     * becomes the global one.
+     * @param locale The locale to set.
      */
     public void setLocale(Locale locale) {
         // <!> TODO : in Rhino the local is for a thread not a scope..
@@ -540,22 +517,4 @@
     public String formatMessage(String key, Object[] args) {
         return null;
     }
-
-    public class ExtendedContext extends Context {
-        public ExtendedContext() {
-            super();
-        }
-
-        public RhinoInterpreter getInterpreter() {
-            return RhinoInterpreter.this;
-        }
-
-        public Window getWindow() {
-            return RhinoInterpreter.this.getWindow();
-        }
-
-        public ScriptableObject getGlobalObject() {
-            return RhinoInterpreter.this.getGlobalObject();
-        }
-    }
 }
diff --git a/sources/org/apache/batik/script/rhino/WindowWrapper.java b/sources/org/apache/batik/script/rhino/WindowWrapper.java
index 1a1ec23..4f0b981 100644
--- a/sources/org/apache/batik/script/rhino/WindowWrapper.java
+++ b/sources/org/apache/batik/script/rhino/WindowWrapper.java
@@ -47,12 +47,23 @@
     private final static Object[] EMPTY_ARGUMENTS = new Object[0];
 
     /**
+     * The rhino interpreter.
+     */
+    protected RhinoInterpreter interpreter;
+    
+    /**
+     * The wrapped window.
+     */
+    protected Window window;
+
+    /**
      * Creates a new WindowWrapper.
      */
     public WindowWrapper(Context context) {
         super(context);
-        String[] names = { "setInterval", "setTimeout", "clearInterval", "clearTimeout",
-                           "parseXML", "getURL", "alert", "confirm", "prompt" };
+        String[] names = { "setInterval", "setTimeout", "clearInterval", 
+                           "clearTimeout", "parseXML", "getURL", "postURL",
+                           "alert", "confirm", "prompt" };
         try {
             this.defineFunctionProperties(names, WindowWrapper.class,
                                           ScriptableObject.DONTENUM);
@@ -78,7 +89,9 @@
                                      Function funObj)
         throws JavaScriptException {
         int len = args.length;
-        Window window = ((RhinoInterpreter.ExtendedContext)cx).getWindow();
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
+
         if (len < 2) {
             throw Context.reportRuntimeError("invalid argument count");
         }
@@ -105,7 +118,8 @@
                                     Function funObj)
         throws JavaScriptException {
         int len = args.length;
-        Window window = ((RhinoInterpreter.ExtendedContext)cx).getWindow();
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
         if (len < 2) {
             throw Context.reportRuntimeError("invalid argument count");
         }
@@ -132,7 +146,8 @@
                                      Function funObj)
         throws JavaScriptException {
         int len = args.length;
-        Window window = ((RhinoInterpreter.ExtendedContext)cx).getWindow();
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
         if (len >= 1) {
             window.clearInterval(Context.toType(args[0], Object.class));
         }
@@ -147,7 +162,8 @@
                                     Function funObj)
         throws JavaScriptException {
         int len = args.length;
-        Window window = ((RhinoInterpreter.ExtendedContext)cx).getWindow();
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
         if (len >= 1) {
             window.clearTimeout(Context.toType(args[0], Object.class));
         }
@@ -162,8 +178,8 @@
                                   Function funObj)
         throws JavaScriptException {
         int len = args.length;
-        final Window window = 
-            ((RhinoInterpreter.ExtendedContext)cx).getWindow();
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        final Window window = ww.window;
         if (len < 2) {
             throw Context.reportRuntimeError("invalid argument count");
         }
@@ -190,8 +206,8 @@
                               Function funObj)
         throws JavaScriptException {
         int len = args.length;
-        final Window window = ((RhinoInterpreter.ExtendedContext)cx).getWindow();
-        final ScriptableObject go = ((RhinoInterpreter.ExtendedContext)cx).getGlobalObject();
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        final Window window = ww.window;
         if (len < 2) {
             throw Context.reportRuntimeError("invalid argument count");
         }
@@ -201,10 +217,10 @@
         Window.URLResponseHandler urlHandler = null;
         if (args[1] instanceof Function) {
             urlHandler = new GetURLFunctionWrapper
-                (interp, (Function)args[1], go);
+                (interp, (Function)args[1], ww);
         } else {
             urlHandler = new GetURLObjectWrapper
-                (interp, (NativeObject)args[1], go);
+                (interp, (NativeObject)args[1], ww);
         }
         final Window.URLResponseHandler fw = urlHandler;
 
@@ -239,8 +255,8 @@
                                Function funObj)
         throws JavaScriptException {
         int len = args.length;
-        final Window window = ((RhinoInterpreter.ExtendedContext)cx).getWindow();
-        final ScriptableObject go = ((RhinoInterpreter.ExtendedContext)cx).getGlobalObject();
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        final Window window = ww.window;
         if (len < 3) {
             throw Context.reportRuntimeError("invalid argument count");
         }
@@ -251,10 +267,10 @@
         Window.URLResponseHandler urlHandler = null;
         if (args[2] instanceof Function) {
             urlHandler = new GetURLFunctionWrapper
-                (interp, (Function)args[2], go);
+                (interp, (Function)args[2], ww);
         } else {
             urlHandler = new GetURLObjectWrapper
-                (interp, (NativeObject)args[2], go);
+                (interp, (NativeObject)args[2], ww);
         }
         final Window.URLResponseHandler fw = urlHandler;
 
@@ -269,6 +285,7 @@
                         return null;
                     }
                 }, acc);
+            break;
         case 4:
             AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
@@ -278,6 +295,7 @@
                         return null;
                     }
                 }, acc);
+            break;
         default:
             AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
@@ -300,7 +318,8 @@
                              Function funObj)
         throws JavaScriptException {
         int len = args.length;
-        Window window = ((RhinoInterpreter.ExtendedContext)cx).getWindow();
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
         if (len >= 1) {
             String message =
                 (String)Context.toType(args[0], String.class);
@@ -317,7 +336,8 @@
                                   Function funObj)
         throws JavaScriptException {
         int len = args.length;
-        Window window = ((RhinoInterpreter.ExtendedContext)cx).getWindow();
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
         if (len >= 1) {
             String message =
                 (String)Context.toType(args[0], String.class);
@@ -338,7 +358,8 @@
                                 Function funObj)
         throws JavaScriptException {
         int len = args.length;
-        Window window = ((RhinoInterpreter.ExtendedContext)cx).getWindow();
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
         switch (len) {
         case 0:
             return Context.toObject("", thisObj);
@@ -417,18 +438,18 @@
         protected Function function;
 
         /**
-         * The Scope for callback
+         * The WindowWrapper
          */
-        protected ScriptableObject scope;
+        protected WindowWrapper windowWrapper;
 
         /**
          * Creates a wrapper.
          */
         public GetURLFunctionWrapper(RhinoInterpreter ri, Function fct,
-                                     ScriptableObject sc) {
+                                     WindowWrapper ww) {
             interpreter = ri;
             function = fct;
-            scope = sc;
+            windowWrapper = ww;
         }
 
         /**
@@ -443,7 +464,8 @@
             try {
                 interpreter.callHandler
                     (function, 
-                     new GetURLDoneArgBuilder(success, mime, content, scope));
+                     new GetURLDoneArgBuilder(success, mime, 
+                                              content, windowWrapper));
             } catch (JavaScriptException e) {
                 throw new WrappedException(e);
             }
@@ -469,7 +491,7 @@
         /**
          * The Scope for the callback.
          */
-        private ScriptableObject scope;
+        private WindowWrapper windowWrapper;
 
         private static final String COMPLETE = "operationComplete";
 
@@ -478,10 +500,10 @@
          */
         public GetURLObjectWrapper(RhinoInterpreter ri,
                                    ScriptableObject obj,
-                                   ScriptableObject sc) {
+                                   WindowWrapper ww) {
             interpreter = ri;
             object = obj;
-            scope = sc;
+            windowWrapper = ww;
         }
 
         /**
@@ -496,7 +518,8 @@
             try {
                 interpreter.callMethod
                     (object, COMPLETE,
-                     new GetURLDoneArgBuilder(success, mime, content, scope));
+                     new GetURLDoneArgBuilder(success, mime, 
+                                              content, windowWrapper));
             } catch (JavaScriptException e) {
                 Context.exit();
                 throw new WrappedException(e);
@@ -508,14 +531,14 @@
         implements RhinoInterpreter.ArgumentsBuilder {
         boolean success;
         String mime, content;
-        ScriptableObject scope;
+        WindowWrapper windowWrapper;
         public GetURLDoneArgBuilder(boolean success, 
                                     String mime, String content,
-                                    ScriptableObject scope) {
+                                    WindowWrapper ww) {
             this.success = success;
             this.mime    = mime;
             this.content = content;
-            this.scope   = scope;
+            this.windowWrapper = ww;
         }
 
         public Object[] buildArguments() {
@@ -524,11 +547,11 @@
                    (success) ? Boolean.TRUE : Boolean.FALSE);
             if (mime != null) {
                 so.put("contentType", so,
-                       Context.toObject(mime, scope));
+                       Context.toObject(mime, windowWrapper));
             }
             if (content != null) {
                 so.put("content", so,
-                       Context.toObject(content, scope));
+                       Context.toObject(content, windowWrapper));
             }
             return new Object [] { so };
         }
diff --git a/sources/org/apache/batik/svggen/AbstractImageHandlerEncoder.java b/sources/org/apache/batik/svggen/AbstractImageHandlerEncoder.java
index 93cecb2..a8e0597 100644
--- a/sources/org/apache/batik/svggen/AbstractImageHandlerEncoder.java
+++ b/sources/org/apache/batik/svggen/AbstractImageHandlerEncoder.java
@@ -98,7 +98,6 @@
     }
 
     /**
-     * @param generatorContext the context in which the handler will work.
      * @param imageDir directory where this handler should generate images.
      *        If null, an SVGGraphics2DRuntimeException is thrown.
      * @param urlRoot root for the urls that point to images created by this
diff --git a/sources/org/apache/batik/svggen/AbstractSVGConverter.java b/sources/org/apache/batik/svggen/AbstractSVGConverter.java
index b7a9d57..276c1ca 100644
--- a/sources/org/apache/batik/svggen/AbstractSVGConverter.java
+++ b/sources/org/apache/batik/svggen/AbstractSVGConverter.java
@@ -53,7 +53,7 @@
     protected List defSet = new LinkedList();
 
     /**
-     * @param genratorContext can be used by the SVGConverter extentions
+     * @param generatorContext can be used by the SVGConverter extensions
      *        to create Elements and other types of DOM objects.
      */
     public AbstractSVGConverter(SVGGeneratorContext generatorContext) {
diff --git a/sources/org/apache/batik/svggen/DOMGroupManager.java b/sources/org/apache/batik/svggen/DOMGroupManager.java
index 935d647..a6968e4 100644
--- a/sources/org/apache/batik/svggen/DOMGroupManager.java
+++ b/sources/org/apache/batik/svggen/DOMGroupManager.java
@@ -65,22 +65,22 @@
      * Reference to the GraphicContext this manager will use to
      * reflect style attributes in the tree nodes.
      */
-    private GraphicContext gc;
+    protected GraphicContext gc;
 
     /**
      * DOMTreeManager that this group manager cooperates with
      */
-    private DOMTreeManager domTreeManager;
+    protected DOMTreeManager domTreeManager;
 
     /**
      * Current group's SVG GraphicContext state
      */
-    private SVGGraphicContext groupGC;
+    protected SVGGraphicContext groupGC;
 
     /**
      * Current group node
      */
-    private Element currentGroup;
+    protected Element currentGroup;
 
     /**
      * Constructor
@@ -136,8 +136,9 @@
             currentGroup.appendChild(element);
 
             groupGC = domTreeManager.gcConverter.toSVG(gc);
-            SVGGraphicContext deltaGC = processDeltaGC(groupGC,
-                                                       domTreeManager.defaultGC);
+            SVGGraphicContext deltaGC;
+            deltaGC = processDeltaGC(groupGC,
+                                     domTreeManager.defaultGC);
             domTreeManager.getStyleHandler().
                 setStyle(currentGroup, deltaGC.getGroupContext(),
                          domTreeManager.getGeneratorContext());
@@ -217,14 +218,14 @@
      * overrides. Only differences in the group context are considered
      * overrides.
      */
-    private int countOverrides(SVGGraphicContext deltaGC) {
+    protected int countOverrides(SVGGraphicContext deltaGC) {
         return deltaGC.getGroupContext().size();
     }
 
     /**
      * Removes properties that do not apply for a specific element
      */
-    private void trimContextForElement(SVGGraphicContext svgGC, Element element) {
+    protected void trimContextForElement(SVGGraphicContext svgGC, Element element) {
         String tag = element.getTagName();
         Map groupAttrMap = svgGC.getGroupContext();
         if (tag != null) {
@@ -246,7 +247,7 @@
      * Processes the transform attribute value corresponding to a
      * given transform stack
      */
-    private void setTransform(Element element,
+    protected void setTransform(Element element,
                               TransformStackElement transformStack[]) {
         String transform = domTreeManager.gcConverter.
             toSVG(transformStack).trim();
@@ -259,7 +260,7 @@
      * in gc that are different from the values in referenceGc will be
      * present in the delta. Other values will no.
      */
-    private SVGGraphicContext processDeltaGC(SVGGraphicContext gc,
+    protected SVGGraphicContext processDeltaGC(SVGGraphicContext gc,
                                              SVGGraphicContext referenceGc) {
         Map groupDelta = processDeltaMap(gc.getGroupContext(),
                                          referenceGc.getGroupContext());
@@ -310,7 +311,7 @@
      * are different from values in referenceMap are place in the
      * returned delta Map.
      */
-    private Map processDeltaMap(Map map, Map referenceMap) {
+    protected Map processDeltaMap(Map map, Map referenceMap) {
         // no need to be synch => HashMap
         Map mapDelta = new HashMap();
         Iterator iter = map.keySet().iterator();
diff --git a/sources/org/apache/batik/svggen/DOMTreeManager.java b/sources/org/apache/batik/svggen/DOMTreeManager.java
index 9447cf1..38430f6 100644
--- a/sources/org/apache/batik/svggen/DOMTreeManager.java
+++ b/sources/org/apache/batik/svggen/DOMTreeManager.java
@@ -70,13 +70,13 @@
      * Set of group managers that build groups for
      * this manager
      */
-    private Vector groupManagers = new Vector();
+    protected Vector groupManagers = new Vector();
 
     /**
      * Set of definitions that are to be placed at the top of the
      * document tree
      */
-    private List genericDefSet = new LinkedList();
+    protected List genericDefSet = new LinkedList();
 
     /**
      * Default SVG GraphicContext state
@@ -86,7 +86,7 @@
     /**
      * Top level group
      */
-    private Element topLevelGroup;
+    protected Element topLevelGroup;
 
     /**
      * Used to convert the Java 2D API graphic context state
@@ -99,30 +99,25 @@
      * The context that stores the domFactory, the imageHandler
      * and the extensionHandler.
      */
-    private SVGGeneratorContext generatorContext;
+    protected SVGGeneratorContext generatorContext;
 
     /**
      * Converters used bVy this object to translate graphic context
      * attributes
      */
-    private SVGBufferedImageOp filterConverter;
+    protected SVGBufferedImageOp filterConverter;
 
     /**
      * Set of definitions which can be used by custom extensions
      */
-    private List otherDefs;
+    protected List otherDefs;
 
     /**
      * Constructor
      * @param gc default graphic context state
-     * @param domFactory used to create top level svg root node
-     *                    and children group nodes.
-     * @param extensionHandler used by SVGConverters to handle custom
-     *                         implementations of interfaces such as Paint,
-     *                         Composite and BufferedImageOp.
+     * @param generatorContext the SVG generator context
      * @param maxGCOverrides defines how many overrides are allowed
      *                       in children nodes of the current group.
-     * @param imageHandler used by SVGConverters to handle image elements.
      */
     public DOMTreeManager(GraphicContext gc,
                           SVGGeneratorContext generatorContext,
@@ -185,7 +180,7 @@
     /**
      * Reset the state of this object to handler a new topLevelGroup
      */
-    private void recycleTopLevelGroup(){
+    protected void recycleTopLevelGroup(){
         recycleTopLevelGroup(true);
     }
 
@@ -193,7 +188,7 @@
     /**
      * Reset the state of this object to handler a new topLevelGroup
      */
-    private void recycleTopLevelGroup(boolean recycleConverters){
+    protected void recycleTopLevelGroup(boolean recycleConverters){
         // First, recycle group managers
         int nManagers = groupManagers.size();
         for(int i=0; i<nManagers; i++){
@@ -215,8 +210,9 @@
     }
 
     /**
-     * Sets the topLevelGroup to the input element. This will throw an exception
-     * if the input element is not of type 'g' or if it is null.
+     * Sets the topLevelGroup to the input element. This will throw an
+     * exception if the input element is not of type 'g' or if it is
+     * null.
      */
     public void setTopLevelGroup(Element topLevelGroup){
         if(topLevelGroup == null)
@@ -280,8 +276,8 @@
      *         definitions
      */
     public Element getGenericDefinitions() {
-        // when called several times, this will create several generic definition
-        // elements... not sure it is desired behavior...
+        // when called several times, this will create several generic
+        // definition elements... not sure it is desired behavior...
         Element genericDefs =
             generatorContext.domFactory.createElementNS(SVG_NAMESPACE_URI,
                                                         SVG_DEFS_TAG);
@@ -304,7 +300,7 @@
     /**
      * This will change the extension handler on the
      * <code>SVGGeneratorContext</code>.
-     * @param new extension handler this object should use
+     * @param extensionHandler new extension handler this object should use
      */
     void setExtensionHandler(ExtensionHandler extensionHandler) {
         generatorContext.setExtensionHandler(extensionHandler);
diff --git a/sources/org/apache/batik/svggen/SVGArc.java b/sources/org/apache/batik/svggen/SVGArc.java
index 61e8b18..a96fc26 100644
--- a/sources/org/apache/batik/svggen/SVGArc.java
+++ b/sources/org/apache/batik/svggen/SVGArc.java
@@ -18,6 +18,7 @@
 package org.apache.batik.svggen;
 
 import java.awt.geom.Arc2D;
+import java.awt.geom.Ellipse2D;
 import java.awt.geom.Line2D;
 import java.awt.geom.Point2D;
 
@@ -32,12 +33,18 @@
  * @version $Id$
  */
 public class SVGArc extends SVGGraphicObjectConverter {
+
     /**
      * Line converter used for degenerate cases
      */
     private SVGLine svgLine;
 
     /**
+     * Ellipse converter for 360 degree arcs.
+     */
+    private SVGEllipse svgEllipse;
+
+    /**
      * @param generatorContext used to build Elements
      */
     public SVGArc(SVGGeneratorContext generatorContext) {
@@ -48,23 +55,36 @@
      * @param arc the Arc2D object to be converted
      */
     public Element toSVG(Arc2D arc) {
-        if ((arc.getWidth() == 0) ||  (arc.getHeight() == 0)) {
+        double ext    = arc.getAngleExtent();
+        double width  = arc.getWidth();
+        double height = arc.getHeight();
+
+        if (width == 0 || height == 0) {
             Line2D line = new Line2D.Double
                 (arc.getX(), arc.getY(), 
-                 arc.getX() + arc.getWidth(), 
-                 arc.getY() + arc.getHeight());
-            if (svgLine == null)
+                 arc.getX() + width, 
+                 arc.getY() + height);
+            if (svgLine == null) {
                 svgLine = new SVGLine(generatorContext);
+            }
             return svgLine.toSVG(line);
         }
 
+        if (ext >= 360 || ext <= -360) {
+            Ellipse2D ellipse = new Ellipse2D.Double
+                (arc.getX(), arc.getY(), width, height);
+            if (svgEllipse == null) {
+                svgEllipse = new SVGEllipse(generatorContext);
+            }
+            return svgEllipse.toSVG(ellipse);
+        }
+
         Element svgPath = generatorContext.domFactory.createElementNS
             (SVG_NAMESPACE_URI, SVG_PATH_TAG);
         StringBuffer d = new StringBuffer("");
 
         Point2D startPt = arc.getStartPoint();
         Point2D endPt   = arc.getEndPoint();
-        double  ext     = arc.getAngleExtent();
         int     type    = arc.getArcType();
 
         d.append(PATH_MOVE);
@@ -74,17 +94,25 @@
         d.append(SPACE);
 
         d.append(PATH_ARC);
-        d.append(doubleString(arc.getWidth()/2));
+        d.append(doubleString(width / 2));
         d.append(SPACE);
-        d.append(doubleString(arc.getHeight()/2));
+        d.append(doubleString(height / 2));
         d.append(SPACE);
         d.append("0");  // no rotation with J2D arc.
         d.append(SPACE);
-        if (ext > 180)  d.append("1");  // use large arc.
-        else            d.append("0");  // use small arc.
-        d.append(SPACE);
-        if (ext > 0)    d.append("0");  // sweep ccw
-        else            d.append("1");  // sweep cw
+        if (ext > 0) { 
+            // CCW sweep case, ext > 0
+            if (ext > 180)  d.append("1");  // use large arc.
+            else            d.append("0");  // use small arc.
+            d.append(SPACE);
+            d.append("0");  // sweep ccw
+        } else {
+            // CW sweep case, ext < 0
+            if (ext < -180)  d.append("1");  // use large arc.
+            else             d.append("0");  // use small arc.
+            d.append(SPACE);
+            d.append("1");  // sweep cw
+        }
 
         d.append(SPACE);
         d.append(doubleString(endPt.getX()));
@@ -94,8 +122,8 @@
         if (type == Arc2D.CHORD) {
             d.append(PATH_CLOSE);
         } else if (type == Arc2D.PIE) {
-            double cx = arc.getX()+arc.getWidth()/2;
-            double cy = arc.getY()+arc.getHeight()/2;
+            double cx = arc.getX() + width / 2;
+            double cy = arc.getY() + height / 2;
             d.append(PATH_LINE_TO);
             d.append(SPACE);
             d.append(doubleString(cx));
diff --git a/sources/org/apache/batik/svggen/SVGAttributeMap.java b/sources/org/apache/batik/svggen/SVGAttributeMap.java
index 9082db3..a7874cb 100644
--- a/sources/org/apache/batik/svggen/SVGAttributeMap.java
+++ b/sources/org/apache/batik/svggen/SVGAttributeMap.java
@@ -34,7 +34,7 @@
     private static Map attrMap = new HashMap();
 
     /**
-     * @param name SVG name of the requested attribute
+     * @param attrName SVG name of the requested attribute
      * @return attribute with requested name
      */
     public static SVGAttribute get(String attrName) {
diff --git a/sources/org/apache/batik/svggen/SVGClipDescriptor.java b/sources/org/apache/batik/svggen/SVGClipDescriptor.java
index 3e4b293..d211541 100644
--- a/sources/org/apache/batik/svggen/SVGClipDescriptor.java
+++ b/sources/org/apache/batik/svggen/SVGClipDescriptor.java
@@ -37,8 +37,9 @@
     private Element clipPathDef;
 
     /**
+     * Creates a new SVGClipDescriptor.
+     * @param clipPathValue the clip path value
      * @param clipPathDef definition of a clip path
-     * @param attribute value referencing clipPathDef
      */
     public SVGClipDescriptor(String clipPathValue, Element clipPathDef){
         if (clipPathValue == null)
diff --git a/sources/org/apache/batik/svggen/SVGComposite.java b/sources/org/apache/batik/svggen/SVGComposite.java
index 04f0cc5..fed7f7c 100644
--- a/sources/org/apache/batik/svggen/SVGComposite.java
+++ b/sources/org/apache/batik/svggen/SVGComposite.java
@@ -26,14 +26,16 @@
 
 /**
  * Utility class that converts a Composite object into
- * a set of SVG properties and definitions. Here is
- * how Composites are mapped to SVG:
- * + AlphaComposite.SRC_OVER with extra alpha is mapped
- *   to the opacity attribute
- * + AlphaComposite's other rules are translated into
- *   predefined filter effects.
- * + Custom Composite implementations are handled by the
- *   extension mechanism.
+ * a set of SVG properties and definitions.
+ * <p>Here is how Composites are mapped to SVG:</p>
+ * <ul>
+ *   <li>AlphaComposite.SRC_OVER with extra alpha is mapped
+ *     to the opacity attribute</li>
+ *   <li>AlphaComposite's other rules are translated into
+ *     predefined filter effects.</li>
+ *   <li>Custom Composite implementations are handled by the
+ *     extension mechanism.</li>
+ * </ul>
  *
  * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
@@ -56,10 +58,8 @@
     private SVGGeneratorContext generatorContext;
 
     /**
-     * @param domFactory used by the converter to create Element and other
-     *        needed DOM objects
-     * @param extensionHandler can be invoked to handle unknown Composite
-     *        implementations.
+     * @param generatorContext The generator context used for handling
+     *        custom and alpha composites
      */
     public SVGComposite(SVGGeneratorContext generatorContext) {
         this.svgAlphaComposite =  new SVGAlphaComposite(generatorContext);
diff --git a/sources/org/apache/batik/svggen/SVGConvolveOp.java b/sources/org/apache/batik/svggen/SVGConvolveOp.java
index ea7d0b6..82ac6e0 100644
--- a/sources/org/apache/batik/svggen/SVGConvolveOp.java
+++ b/sources/org/apache/batik/svggen/SVGConvolveOp.java
@@ -45,7 +45,7 @@
      * Converts a Java 2D API BufferedImageOp into
      * a set of attribute/value pairs and related definitions
      *
-     * @param op BufferedImageOp filter to be converted
+     * @param filter BufferedImageOp filter to be converted
      * @param filterRect Rectangle, in device space, that defines the area
      *        to which filtering applies. May be null, meaning that the
      *        area is undefined.
diff --git a/sources/org/apache/batik/svggen/SVGFilterConverter.java b/sources/org/apache/batik/svggen/SVGFilterConverter.java
index 23a5355..1e87daf 100644
--- a/sources/org/apache/batik/svggen/SVGFilterConverter.java
+++ b/sources/org/apache/batik/svggen/SVGFilterConverter.java
@@ -34,7 +34,7 @@
      * Converts a Java 2D API BufferedImageOp into
      * a set of attribute/value pairs and related definitions
      *
-     * @param op BufferedImageOp filter to be converted
+     * @param filter BufferedImageOp filter to be converted
      * @param filterRect Rectangle, in device space, that defines the area
      *        to which filtering applies. May be null, meaning that the
      *        area is undefined.
diff --git a/sources/org/apache/batik/svggen/SVGGeneratorContext.java b/sources/org/apache/batik/svggen/SVGGeneratorContext.java
index ab70050..7e050e4 100755
--- a/sources/org/apache/batik/svggen/SVGGeneratorContext.java
+++ b/sources/org/apache/batik/svggen/SVGGeneratorContext.java
@@ -39,7 +39,7 @@
  * You can subclass it to change the defaults.
  *
  * @see org.apache.batik.svggen.SVGGraphics2D#SVGGraphics2D(SVGGeneratorContext,boolean)
- * @author <a href="mailto:cjolif@ilog.fr>Christophe Jolif</a>
+ * @author <a href="mailto:cjolif@ilog.fr">Christophe Jolif</a>
  * @version $Id$
  */
 public class SVGGeneratorContext implements ErrorConstants {
diff --git a/sources/org/apache/batik/svggen/SVGGraphics2D.java b/sources/org/apache/batik/svggen/SVGGraphics2D.java
index 6394a09..516b7a0 100644
--- a/sources/org/apache/batik/svggen/SVGGraphics2D.java
+++ b/sources/org/apache/batik/svggen/SVGGraphics2D.java
@@ -103,7 +103,7 @@
      * the DOMTreeManager to process attributes based on the
      * GraphicContext state and create groups when needed.
      */
-    private DOMTreeManager domTreeManager;
+    protected DOMTreeManager domTreeManager;
 
     /**
      * The DOMGroupManager manages additions to the current group
@@ -115,28 +115,28 @@
      * originating from the same SVGGraphics2D through various
      * createGraphics calls share the same DOMTreeManager.
      */
-    private DOMGroupManager domGroupManager;
+    protected DOMGroupManager domGroupManager;
 
     /**
      * Contains some information for SVG generation.
      */
-    private SVGGeneratorContext generatorCtx;
+    protected SVGGeneratorContext generatorCtx;
 
     /**
      * Used to convert Java 2D API Shape objects to equivalent SVG
      * elements
      */
-    private SVGShape shapeConverter;
+    protected SVGShape shapeConverter;
 
     /**
      * SVG Canvas size
      */
-    private Dimension svgCanvasSize;
+    protected Dimension svgCanvasSize;
 
     /**
      * Used to create proper font metrics
      */
-    private Graphics2D fmg;
+    protected Graphics2D fmg;
 
     {
         BufferedImage bi
@@ -153,7 +153,10 @@
     }
 
     /**
-     * @param SVG Canvas size. May be null (equivalent to 100%, 100%)
+     * Set the Canvas size, this is used to set the width and
+     * height attributes on the outermost 'svg' element.
+     * @param svgCanvasSize SVG Canvas size. May be null (equivalent
+     * to 100%, 100%)
      */
     public final void setSVGCanvasSize(Dimension svgCanvasSize) {
         this.svgCanvasSize = new Dimension(svgCanvasSize);
@@ -167,12 +170,29 @@
     }
 
     /**
+     * @return the SVGShape used by this SVGGraphics2D instance to
+     *         turn Java2D shapes into SVG Shape objects.
+     */ 
+    public final SVGShape getShapeConverter() {
+        return shapeConverter;
+    }
+
+    /**
      * @return the DOMTreeManager used by this SVGGraphics2D instance
      */
     public final DOMTreeManager getDOMTreeManager(){
         return domTreeManager;
     }
 
+    /** 
+     * Set a DOM Tree manager for the SVGGraphics2D.
+     * @param treeMgr the new DOM Tree manager this SVGGraphics2D should use
+     */
+     protected final void setDOMTreeManager(DOMTreeManager treeMgr) {
+        this.domTreeManager = treeMgr;
+        generatorCtx.genericImageHandler.setDOMTreeManager(domTreeManager);
+    }
+
      /**
      * @return the DOMGroupManager used by this SVGGraphics2D instance
      */
@@ -180,6 +200,14 @@
         return domGroupManager;
     }
 
+    /** 
+     * Set a new DOM Group manager for this SVGGraphics2D.
+     * @param groupMgr the new DOM Group manager this SVGGraphics2D should use
+     */
+     protected final void setDOMGroupManager(DOMGroupManager groupMgr) {
+	this.domGroupManager = groupMgr;
+    }
+
     /**
      * @return the Document used as a DOM object factory by this
      *         SVGGraphics2D instance
@@ -210,7 +238,8 @@
     }
 
     /**
-     * @param new extension handler this SVGGraphics2D should use
+     * @param extensionHandler new extension handler this SVGGraphics2D
+     *        should use
      */
     public final void setExtensionHandler(ExtensionHandler extensionHandler) {
         generatorCtx.setExtensionHandler(extensionHandler);
@@ -227,7 +256,7 @@
 
     /**
      * @param domFactory Factory which will produce Elements for the DOM tree
-     *                    this Graphics2D generates.
+     *                   this Graphics2D generates.
      * @param imageHandler defines how images are referenced in the
      *                     generated SVG fragment
      * @param extensionHandler defines how Java 2D API extensions map
@@ -268,7 +297,8 @@
     }
 
     /**
-     * @param generatorContext the <code>SVGGeneratorContext</code> instance
+     * Creates a new SVGGraphics2D object.
+     * @param generatorCtx the <code>SVGGeneratorContext</code> instance
      * that will provide all useful information to the generator.
      * @param textAsShapes if true, all text is turned into SVG shapes in the
      *        convertion. No SVG text is output.
@@ -289,7 +319,7 @@
     /**
      * Sets an non null <code>SVGGeneratorContext</code>.
      */
-    private void setGeneratorContext(SVGGeneratorContext generatorCtx) {
+    protected void setGeneratorContext(SVGGeneratorContext generatorCtx) {
         this.generatorCtx = generatorCtx;
 
         this.gc = new GraphicContext(new AffineTransform());
@@ -331,7 +361,7 @@
     }
 
     /**
-     * This private constructor is used in create
+     * This constructor is used in create()
      *
      * @see #create
      */
@@ -515,8 +545,8 @@
      *
      * @param svgRoot an SVG element underwhich the content should 
      *        be appended.
-     * @returns the svg root node of the SVG document associated with 
-     *          this object.
+     * @return the svg root node of the SVG document associated with 
+     *         this object.
      */
     public Element getRoot(Element svgRoot) {
         svgRoot = domTreeManager.getRoot(svgRoot);
@@ -846,9 +876,10 @@
      * </pre>
      * @param op the filter to be applied to the image before rendering
      * @param img the <code>BufferedImage</code> to be rendered
-     * @param x,&nbsp;y the location in user space where the upper left
-     * corner of the
-     * image is rendered
+     * @param x the x coordinate in user space where the upper left
+     *          corner of the image is rendered
+     * @param y the y coordinate in user space where the upper left
+     *          corner of the image is rendered
      * @see #transform
      * @see #setTransform
      * @see #setComposite
@@ -966,7 +997,7 @@
      * that no rendering is done if the specified transform is
      * noninvertible.
      * @param img the image to be rendered
-     * @param xform the transformation from image space into user space
+     * @param trans2 the transformation from image space into user space
      * @see #transform
      * @see #setTransform
      * @see #setComposite
@@ -1036,7 +1067,7 @@
      * <code>Transform</code>, and <code>Composite</code> attributes. Note
      * that no rendering is done if the specified transform is
      * noninvertible.
-     *<p>
+     * <p>
      * Rendering hints set on the <code>Graphics2D</code> object might
      * be used in rendering the <code>RenderableImage</code>.
      * If explicit control is required over specific hints recognized by a
@@ -1044,9 +1075,9 @@
      * are used is required, then a <code>RenderedImage</code> should be
      * obtained directly from the <code>RenderableImage</code>
      * and rendered using
-     *{@link #drawRenderedImage(RenderedImage, AffineTransform)}.
+     * {@link #drawRenderedImage(RenderedImage, AffineTransform)}.
      * @param img the image to be rendered
-     * @param xform the transformation from image space into user space
+     * @param trans2 the transformation from image space into user space
      * @see #transform
      * @see #setTransform
      * @see #setComposite
@@ -1120,8 +1151,10 @@
      * left, in which case the coordinate supplied is the location of the
      * leftmost character on the baseline.
      * @param s the <code>String</code> to be rendered
-     * @param x,&nbsp;y the coordinates where the <code>String</code>
-     * should be rendered
+     * @param x the x coordinate where the <code>String</code>
+     *          should be rendered
+     * @param y the y coordinate where the <code>String</code>
+     *          should be rendered
      * @see #setPaint
      * @see java.awt.Graphics#setColor
      * @see java.awt.Graphics#setFont
@@ -1205,8 +1238,8 @@
      * longer text but shapes), but it is graphically accurate.
      *
      * @param iterator the iterator whose text is to be rendered
-     * @param x,&nbsp;y the coordinates where the iterator's text is to be
-     * rendered
+     * @param x the x coordinate where the iterator's text is to be rendered
+     * @param y the y coordinate where the iterator's text is to be rendered
      * @see #setPaint
      * @see java.awt.Graphics#setColor
      * @see #setTransform
diff --git a/sources/org/apache/batik/svggen/SVGLookupOp.java b/sources/org/apache/batik/svggen/SVGLookupOp.java
index 4dcc5fe..38005ed 100644
--- a/sources/org/apache/batik/svggen/SVGLookupOp.java
+++ b/sources/org/apache/batik/svggen/SVGLookupOp.java
@@ -84,7 +84,7 @@
      * Converts a Java 2D API BufferedImageOp into
      * a set of attribute/value pairs and related definitions
      *
-     * @param op BufferedImageOp filter to be converted
+     * @param filter BufferedImageOp filter to be converted
      * @param filterRect Rectangle, in device space, that defines the area
      *        to which filtering applies. May be null, meaning that the
      *        area is undefined.
diff --git a/sources/org/apache/batik/svggen/SVGRescaleOp.java b/sources/org/apache/batik/svggen/SVGRescaleOp.java
index 9759bb9..8d7d094 100644
--- a/sources/org/apache/batik/svggen/SVGRescaleOp.java
+++ b/sources/org/apache/batik/svggen/SVGRescaleOp.java
@@ -49,7 +49,7 @@
      * Converts a Java 2D API BufferedImageOp into
      * a set of attribute/value pairs and related definitions
      *
-     * @param op BufferedImageOp filter to be converted
+     * @param filter BufferedImageOp filter to be converted
      * @param filterRect Rectangle, in device space, that defines the area
      *        to which filtering applies. May be null, meaning that the
      *        area is undefined.
diff --git a/sources/org/apache/batik/svggen/SwingSVGPrettyPrint.java b/sources/org/apache/batik/svggen/SwingSVGPrettyPrint.java
index 8be62e3..f5cd195 100644
--- a/sources/org/apache/batik/svggen/SwingSVGPrettyPrint.java
+++ b/sources/org/apache/batik/svggen/SwingSVGPrettyPrint.java
@@ -14,7 +14,8 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
- */package org.apache.batik.svggen;
+ */
+package org.apache.batik.svggen;
 
 import java.awt.Component;
 import java.awt.Rectangle;
@@ -32,20 +33,22 @@
 import javax.swing.plaf.ComponentUI;
 
 import org.w3c.dom.Element;
+
 /**
  * This class offers a way to create an SVG document with grouping
  * that reflects the Swing composite structure (container/components).
  *
- * @author             Vincent Hardy
- * @version            1.1, May 2nd, 2000. Added
+ * @author Vincent Hardy
+ * @version $Id$
  */
 public abstract class SwingSVGPrettyPrint implements SVGSyntax {
-        /**
-         * @param cmp Swing component to be converted to SVG
-         * @param svgGen SVGraphics2D to use to paint Swing components
-         * @return an SVG fragment containing an SVG equivalent of the Swing
-         *         component tree.
-         */
+
+    /**
+     * @param cmp Swing component to be converted to SVG
+     * @param svgGen SVGraphics2D to use to paint Swing components
+     * @return an SVG fragment containing an SVG equivalent of the Swing
+     *         component tree.
+     */
     public static void print(JComponent cmp, SVGGraphics2D svgGen) {
         if ((cmp instanceof JComboBox) || (cmp instanceof JScrollBar)) {
             // This is a work around unresolved issue with JComboBox
@@ -85,8 +88,6 @@
     /**
      * @param cmp Swing component to be converted to SVG
      * @param svgGen SVGraphics2D to use to paint Swing components
-     * @return an SVG fragment containing an SVG equivalent of the Swing
-     *         component tree.
      */
     private static void printHack(JComponent cmp, SVGGraphics2D svgGen) {
         // Spawn a new Graphics2D for this component
diff --git a/sources/org/apache/batik/svggen/font/SVGFont.java b/sources/org/apache/batik/svggen/font/SVGFont.java
index af833f6..66ff870 100644
--- a/sources/org/apache/batik/svggen/font/SVGFont.java
+++ b/sources/org/apache/batik/svggen/font/SVGFont.java
@@ -259,7 +259,8 @@
     }
 
     /**
-     * Returns a <font>...</font> block, defining the specified font.
+     * Returns a &lt;font&gt;&#x2e;&#x2e;&#x2e;&lt;/font&gt; block,
+     * defining the specified font.
      *
      * @param font The TrueType font to be converted to SVG
      * @param id An XML id attribute for the font element
@@ -504,7 +505,8 @@
                 arabInitGlyphIndex,
                 defaultHorizAdvanceX,
                 // " arabic-form=\"initial\"",
-                SVG_ARABIC_FORM_ATTRIBUTE + XML_EQUAL_QUOT + SVG_INITIAL_VALUE + XML_CHAR_QUOT,
+                (XML_SPACE + SVG_ARABIC_FORM_ATTRIBUTE + XML_EQUAL_QUOT + 
+                 SVG_INITIAL_VALUE + XML_CHAR_QUOT),
                 code));
             // sb.append("\r\n");
             sb.append(EOL);
@@ -517,8 +519,9 @@
                 font.getGlyph(arabMediGlyphIndex),
                 arabMediGlyphIndex,
                 defaultHorizAdvanceX,
-                SVG_ARABIC_FORM_ATTRIBUTE + XML_EQUAL_QUOT + SVG_MEDIAL_VALUE + XML_CHAR_QUOT,
                 // " arabic-form=\"medial\"",
+                (XML_SPACE + SVG_ARABIC_FORM_ATTRIBUTE + XML_EQUAL_QUOT + 
+                 SVG_MEDIAL_VALUE + XML_CHAR_QUOT),
                 code));
             // sb.append("\r\n");
             sb.append(EOL);
@@ -531,8 +534,9 @@
                 font.getGlyph(arabTermGlyphIndex),
                 arabTermGlyphIndex,
                 defaultHorizAdvanceX,
-                SVG_ARABIC_FORM_ATTRIBUTE + XML_EQUAL_QUOT + SVG_TERMINAL_VALUE + XML_CHAR_QUOT,
                 // " arabic-form=\"terminal\"",
+                (XML_SPACE + SVG_ARABIC_FORM_ATTRIBUTE + XML_EQUAL_QUOT + 
+                 SVG_TERMINAL_VALUE + XML_CHAR_QUOT),
                 code));
             // sb.append("\r\n");
             sb.append(EOL);
@@ -545,8 +549,9 @@
                 glyph,
                 glyphIndex,
                 defaultHorizAdvanceX,
-                SVG_ARABIC_FORM_ATTRIBUTE + XML_EQUAL_QUOT + SVG_ISOLATED_VALUE + XML_CHAR_QUOT,
                 // " arabic-form=\"isolated\"",
+                (XML_SPACE + SVG_ARABIC_FORM_ATTRIBUTE + XML_EQUAL_QUOT + 
+                 SVG_ISOLATED_VALUE + XML_CHAR_QUOT),
                 code));
         } else {
             sb.append(getGlyphAsSVG(
diff --git a/sources/org/apache/batik/svggen/font/table/Coverage.java b/sources/org/apache/batik/svggen/font/table/Coverage.java
index 363152f..27ff6dd 100644
--- a/sources/org/apache/batik/svggen/font/table/Coverage.java
+++ b/sources/org/apache/batik/svggen/font/table/Coverage.java
@@ -31,7 +31,7 @@
 
     /**
      * @param glyphId The ID of the glyph to find.
-     * @returns The index of the glyph within the coverage, or -1 if the glyph
+     * @return The index of the glyph within the coverage, or -1 if the glyph
      * can't be found.
      */
     public abstract int findGlyph(int glyphId);
diff --git a/sources/org/apache/batik/swing/JSVGCanvas.java b/sources/org/apache/batik/swing/JSVGCanvas.java
index c6148eb..68e6cfc 100644
--- a/sources/org/apache/batik/swing/JSVGCanvas.java
+++ b/sources/org/apache/batik/swing/JSVGCanvas.java
@@ -28,7 +28,10 @@
 import java.awt.geom.AffineTransform;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeSupport;
+import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+import java.util.WeakHashMap;
 
 import javax.swing.AbstractAction;
 import javax.swing.ActionMap;
@@ -52,6 +55,7 @@
 import org.apache.batik.util.SVGConstants;
 import org.apache.batik.util.XMLConstants;
 import org.apache.batik.util.gui.JErrorPane;
+
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.events.Event;
@@ -173,21 +177,41 @@
      * Keeps track of the last known mouse position over the canvas.
      * This is used for displaying tooltips at the right location.
      */
-    protected LocationListener locationListener = null;
+    protected LocationListener locationListener = new LocationListener();
+
+    /**
+     * Mapping of elements to listeners so they can be removed,
+     * if the tooltip is removed.
+     */
+    protected Map toolTipMap = null;
+    protected EventListener toolTipListener = new ToolTipModifier();
+    protected EventTarget   lastTarget = null;;
+    /**
+     * The time of the last tool tip event.
+     */
+    protected long lastToolTipEventTimeStamp;
+
+    /**
+     * The target for which the last tool tip event was fired.
+     */
+    protected EventTarget lastToolTipEventTarget;
+
+
 
     /**
      * Creates a new JSVGCanvas.
      */
     public JSVGCanvas() {
         this(null, true, true);
+        addMouseMotionListener(locationListener);
     }
 
     /**
      * Creates a new JSVGCanvas.
      *
      * @param ua a SVGUserAgent instance or null.
-     * @param eventEnabled Whether the GVT tree should be reactive to mouse and
-     * key events.
+     * @param eventsEnabled Whether the GVT tree should be reactive to mouse
+     *                      and key events.
      * @param selectableText Whether the text should be selectable.
      */
     public JSVGCanvas(SVGUserAgent ua,
@@ -217,6 +241,7 @@
 
             installKeyboardActions();
         }
+        addMouseMotionListener(locationListener);
     }
 
     /**
@@ -520,6 +545,35 @@
 
     }
 
+    protected void installSVGDocument(SVGDocument doc) {
+        if (svgDocument != null) {
+            EventTarget root;
+            root = (EventTarget)svgDocument.getRootElement();
+            root.removeEventListener(SVGConstants.SVG_EVENT_MOUSEOVER,
+                                     toolTipListener, false);
+            root.removeEventListener(SVGConstants.SVG_EVENT_MOUSEOUT,
+                                     toolTipListener, false);
+            lastTarget = null;
+        }
+
+        if (toolTipMap != null) {
+            toolTipMap.clear();
+        }
+
+        if (doc != null) {
+            EventTarget root;
+            root = (EventTarget)doc.getRootElement();
+            // On mouseover, it sets the tooltip to the given value
+            root.addEventListener(SVGConstants.SVG_EVENT_MOUSEOVER,
+                                  toolTipListener, false);
+            // On mouseout, it removes the tooltip
+            root.addEventListener(SVGConstants.SVG_EVENT_MOUSEOUT,
+                                  toolTipListener, false);
+        }
+
+        super.installSVGDocument(doc);
+    }
+
     // ----------------------------------------------------------------------
     // Actions
     // ----------------------------------------------------------------------
@@ -733,7 +787,7 @@
 
     /**
      * The <tt>CanvasUserAgent</tt> only adds tooltips to the behavior of the
-     * default <tt>BridgeUserAgent</tt>.<br /> A tooltip will be displayed
+     * default <tt>BridgeUserAgent</tt>. A tooltip will be displayed
      * wheneven the mouse lingers over an element which has a &lt;title&gt; or a
      * &lt;desc&gt; child element.
      */
@@ -749,16 +803,6 @@
             = "JSVGCanvas.CanvasUserAgent.ToolTip.titleAndDesc";
 
         /**
-         * The time of the last tool tip event.
-         */
-        protected long lastToolTipEventTimeStamp;
-
-        /**
-         * The target for which the last tool tip event was fired.
-         */
-        protected EventTarget lastToolTipEventTarget;
-
-        /**
          * The handleElement method builds a tool tip from the
          * content of a &lt;title&gt; element, a &lt;desc&gt;
          * element or both. <br/>
@@ -787,65 +831,103 @@
 
             // Don't handle tool tips for the root SVG element.
             if (elt.getParentNode() == 
-                    elt.getOwnerDocument().getDocumentElement()) {
+                elt.getOwnerDocument().getDocumentElement()) {
                 return;
             }
 
+            Element parent;
+            // When node is removed data is old parent node
+            // since we can't get it otherwise.
+            if (data instanceof Element) parent = (Element)data;
+            else                         parent = (Element)elt.getParentNode();
+
+            Element descPeer = null;
+            Element titlePeer = null;
             if (elt.getLocalName().equals(SVGConstants.SVG_TITLE_TAG)) {
-                // If there is a <desc> peer, do nothing as the tooltip will
-                // be handled when handleElement is invoked for the <desc>
-                // peer.
-                if (hasPeerWithTag
-                    (elt,
-                     SVGConstants.SVG_NAMESPACE_URI,
-                     SVGConstants.SVG_DESC_TAG)){
-                    return;
-                }
-                
-                elt.normalize();
-                if (elt.getFirstChild() == null) {
-                    return;
-                }
-                String toolTip = elt.getFirstChild().getNodeValue();
-                if (toolTip == null || toolTip.length() == 0) {
-                    return;
-                }
-                toolTip = Messages.formatMessage
-                    (TOOLTIP_TITLE_ONLY,
-                     new Object[]{toFormattedHTML(toolTip)});
-                
-                setToolTip((Element)(elt.getParentNode()), toolTip);
-            } else if (elt.getLocalName().equals
-                       (SVGConstants.SVG_DESC_TAG)) {
-                //  If there is a <title> peer, prepend its content to the
-                // content of the <desc> element.
-                elt.normalize();
-                if (elt.getFirstChild() == null) {
-                    return;
-                }
-                String toolTip = elt.getFirstChild().getNodeValue();
-                if (toolTip == null || toolTip.length() == 0) {
-                    return;
-                }
-                
-                Element titlePeer =
-                    getPeerWithTag(elt,
-                                   SVGConstants.SVG_NAMESPACE_URI,
-                                   SVGConstants.SVG_TITLE_TAG);
-                if (titlePeer != null) {
-                    titlePeer.normalize();
-                    toolTip = Messages.formatMessage(TOOLTIP_TITLE_AND_TEXT,
-                                                     new Object[] {
-                                                         toFormattedHTML(titlePeer.getFirstChild().getNodeValue()),
-                                                         toFormattedHTML(toolTip)});
+                if (data == Boolean.TRUE) 
+                    titlePeer = elt;
+                descPeer = getPeerWithTag(parent,
+                                           SVGConstants.SVG_NAMESPACE_URI,
+                                           SVGConstants.SVG_DESC_TAG);
+            } else if (elt.getLocalName().equals(SVGConstants.SVG_DESC_TAG)) {
+                if (data == Boolean.TRUE) 
+                    descPeer = elt;
+                titlePeer = getPeerWithTag(parent,
+                                           SVGConstants.SVG_NAMESPACE_URI,
+                                           SVGConstants.SVG_TITLE_TAG);
+            }
+
+            String titleTip = null;
+            if (titlePeer != null) {
+                titlePeer.normalize();
+                if (titlePeer.getFirstChild() != null)
+                    titleTip = titlePeer.getFirstChild().getNodeValue();
+            }
+
+            String descTip = null;
+            if (descPeer != null) {
+                descPeer.normalize();
+                if (descPeer.getFirstChild() != null)
+                    descTip = descPeer.getFirstChild().getNodeValue();
+            }
+
+            final String toolTip;
+            if ((titleTip != null) && (titleTip.length() != 0)) {
+                if ((descTip != null) && (descTip.length() != 0)) {
+                    toolTip = Messages.formatMessage
+                        (TOOLTIP_TITLE_AND_TEXT,
+                         new Object[] { toFormattedHTML(titleTip),
+                                        toFormattedHTML(descTip)});
                 } else {
-                    toolTip =
-                        Messages.formatMessage
-                        (TOOLTIP_DESC_ONLY,
-                         new Object[]{toFormattedHTML(toolTip)});
+                    toolTip = Messages.formatMessage
+                        (TOOLTIP_TITLE_ONLY,
+                         new Object[]{toFormattedHTML(titleTip)});
                 }
-                
-                setToolTip((Element)(elt.getParentNode()), toolTip);
+            } else {
+                if ((descTip != null) && (descTip.length() != 0)) {
+                    toolTip = Messages.formatMessage
+                        (TOOLTIP_DESC_ONLY,
+                         new Object[]{toFormattedHTML(descTip)});
+                } else {
+                    toolTip = null;
+                }
+            }
+
+            if (toolTip == null) {
+                removeToolTip(parent);
+                return;
+            }
+
+            if (lastTarget != parent) {
+                setToolTip(parent, toolTip);
+            } else {
+                // Already has focus check if it already has tip text.
+                Object o = null;
+                if (toolTipMap != null) {
+                    o = toolTipMap.get(parent);
+                    toolTipMap.put(parent, toolTip);
+                }
+
+                if (o != null) {
+                    // Update components tooltip text now.
+                    EventQueue.invokeLater(new Runnable() {
+                            public void run() {
+                                setToolTipText(toolTip);
+                                MouseEvent e = new MouseEvent
+                                    (JSVGCanvas.this,
+                                     MouseEvent.MOUSE_MOVED,
+                                     System.currentTimeMillis(),
+                                     0,
+                                     locationListener.getLastX(),
+                                     locationListener.getLastY(),
+                                     0,
+                                     false);
+                                ToolTipManager.sharedInstance().mouseMoved(e);
+                            }
+                        });
+                } else {
+                    EventQueue.invokeLater(new ToolTipRunnable(toolTip));
+                }
             }
         }
 
@@ -880,11 +962,11 @@
          * Checks if there is a peer element of a given type.  This returns the
          * first occurence of the given type or null if none is found.
          */
-        public Element getPeerWithTag(Element elt,
+        public Element getPeerWithTag(Element parent,
                                       String nameSpaceURI,
                                       String localName) {
 
-            Element p = (Element)elt.getParentNode();
+            Element p = (Element)parent;
             if (p == null) {
                 return null;
             }
@@ -918,22 +1000,21 @@
          * Sets the tool tip on the input element.
          */
         public void setToolTip(Element elt, String toolTip){
-            EventTarget target = (EventTarget)elt;
-            elt.normalize();
+            if (toolTipMap == null) {
+                toolTipMap = new WeakHashMap();
+            }
 
-            // On mouseover, set the tooltip to the title value
-            target.addEventListener(SVGConstants.SVG_EVENT_MOUSEOVER,
-                                    new ToolTipModifier(toolTip, this),
-                                    false);
+            toolTipMap.put(elt, toolTip);
 
-            // On mouseout, remove the tooltip
-            target.addEventListener(SVGConstants.SVG_EVENT_MOUSEOUT,
-                                    new ToolTipModifier(null, this),
-                                    false);
+            if (elt == lastTarget)
+                EventQueue.invokeLater(new ToolTipRunnable(toolTip));
+        }
 
-            if (locationListener == null) {
-                locationListener = new LocationListener();
-                addMouseMotionListener(locationListener);
+        public void removeToolTip(Element elt) {
+            if (toolTipMap != null)
+                toolTipMap.remove(elt);
+            if (lastTarget == elt) { // clear ToolTip.
+                EventQueue.invokeLater(new ToolTipRunnable(null));
             }
         }
 
@@ -967,23 +1048,6 @@
                 dialog.setVisible(true); // Safe to be called from any thread
             }
         }
-
-        /**
-         * Sets the time and element of the last tool tip event handled.
-         */
-        public void setLastToolTipEvent(long t, EventTarget et) {
-            lastToolTipEventTimeStamp = t;
-            lastToolTipEventTarget = et;
-        }
-
-        /**
-         * Checks if the specified event time and element are the same
-         * as the last tool tip event.
-         */
-        public boolean matchLastToolTipEvent(long t, EventTarget et) {
-            return lastToolTipEventTimeStamp == t
-                && lastToolTipEventTarget == et;
-        }
     }
 
     // ----------------------------------------------------------------------
@@ -991,6 +1055,23 @@
     // ----------------------------------------------------------------------
 
     /**
+     * Sets the time and element of the last tool tip event handled.
+     */
+    public void setLastToolTipEvent(long t, EventTarget et) {
+        lastToolTipEventTimeStamp = t;
+        lastToolTipEventTarget = et;
+    }
+
+    /**
+     * Checks if the specified event time and element are the same
+     * as the last tool tip event.
+     */
+    public boolean matchLastToolTipEvent(long t, EventTarget et) {
+        return lastToolTipEventTimeStamp == t
+            && lastToolTipEventTarget == et;
+    }
+
+    /**
      * Helper class. Simply keeps track of the last known mouse
      * position over the canvas.
      */
@@ -998,6 +1079,10 @@
 
         protected int lastX, lastY;
 
+        public LocationListener () { 
+            lastX = 0; lastY = 0; 
+        }
+
         public void mouseMoved(MouseEvent evt) {
             lastX = evt.getX();
             lastY = evt.getY();
@@ -1013,65 +1098,99 @@
     }
 
     /**
-     * Sets a specific tooltip on the JSVGCanvas when a given event occurs. This
-     * listener is used in the handleElement method to set, remove or modify the
-     * JSVGCanvas tooltip on mouseover and on mouseout.<br/>
+     * Sets a specific tooltip on the JSVGCanvas when a given event occurs. 
+     * This listener is used in the handleElement method to set, remove or 
+     * modify the JSVGCanvas tooltip on mouseover and on mouseout.<br/>
      *
      * Because we are on a single <tt>JComponent</tt> we trigger an artificial
-     * <tt>MouseEvent</tt> when the toolTip is set to a non-null value, so as to
-     * make sure it will show after the <tt>ToolTipManager</tt>'s default delay.
+     * <tt>MouseEvent</tt> when the toolTip is set to a non-null value, so as 
+     * to make sure it will show after the <tt>ToolTipManager</tt>'s default 
+     * delay.
      */
     protected class ToolTipModifier implements EventListener {
         /**
-         * Value of the toolTip
-         */
-        protected String toolTip;
-
-        /**
          * The CanvasUserAgent used to track the last tool tip event.
          */
         protected CanvasUserAgent canvasUserAgent;
 
         /**
-         * @param toolTip value to which the JSVGCanvas should be
-         *        set when the event occurs.
-         * @param cua the CanvasUserAgent which will be used to track
-         *        the last tool tip event.
+         * Creates a new ToolTipModifier object.
          */
-        public ToolTipModifier(String toolTip, CanvasUserAgent cua) {
-            this.toolTip = toolTip;
-            canvasUserAgent = cua;
+        public ToolTipModifier() {
         }
 
         public void handleEvent(Event evt){
             // Don't set the tool tip if another ToolTipModifier
             // has already handled this event (as it will have been
             // a higher priority tool tip).
-            if (canvasUserAgent.matchLastToolTipEvent(evt.getTimeStamp(),
-                                                     evt.getTarget())) {
+            if (matchLastToolTipEvent(evt.getTimeStamp(), evt.getTarget())) {
                 return;
             }
-            canvasUserAgent.setLastToolTipEvent(evt.getTimeStamp(), 
-                                                evt.getTarget());
+            setLastToolTipEvent(evt.getTimeStamp(), evt.getTarget());
+            EventTarget prevLastTarget = lastTarget;
+            if (SVGConstants.SVG_EVENT_MOUSEOVER.equals(evt.getType())) {
+                lastTarget = evt.getTarget();
+            } else if (SVGConstants.SVG_EVENT_MOUSEOUT.equals(evt.getType())) {
+                // related target is one it is entering or null.
+                org.w3c.dom.events.MouseEvent mouseEvt;
+                mouseEvt = ((org.w3c.dom.events.MouseEvent)evt);
+                lastTarget = mouseEvt.getRelatedTarget(); 
+            }
 
-            EventQueue.invokeLater(new Runnable() {
-                    public void run() {
-                        setToolTipText(toolTip);
+            if (toolTipMap != null) {
+                Object o = toolTipMap.get(lastTarget);
+                final String theToolTip;
+                if (o == null) theToolTip = null;
+                else           theToolTip = (String)o;
+                if (prevLastTarget != lastTarget)
+                    EventQueue.invokeLater(new ToolTipRunnable(theToolTip));
+            }
+        }
+    }
 
-                        if (toolTip != null) {
-                            MouseEvent e = new MouseEvent
-                                (JSVGCanvas.this,
-                                 MouseEvent.MOUSE_ENTERED,
-                                 System.currentTimeMillis(),
-                                 0,
-                                 locationListener.getLastX(),
-                                 locationListener.getLastY(),
-                                 0,
-                                 false);
-                            ToolTipManager.sharedInstance().mouseEntered(e);
-                        }
-                    }
-                });
+    protected class ToolTipRunnable implements Runnable {
+        String theToolTip;
+        public ToolTipRunnable(String toolTip) {
+            this.theToolTip = toolTip;
+        }
+
+        public void run() {
+            setToolTipText(theToolTip);
+
+            MouseEvent e;
+            if (theToolTip != null) {
+                e = new MouseEvent
+                    (JSVGCanvas.this,
+                     MouseEvent.MOUSE_ENTERED,
+                     System.currentTimeMillis(),
+                     0,
+                     locationListener.getLastX(),
+                     locationListener.getLastY(),
+                     0,
+                     false);
+                ToolTipManager.sharedInstance().mouseEntered(e);
+                e = new MouseEvent
+                    (JSVGCanvas.this,
+                     MouseEvent.MOUSE_MOVED,
+                     System.currentTimeMillis(),
+                     0,
+                     locationListener.getLastX(),
+                     locationListener.getLastY(),
+                     0,
+                     false);
+                ToolTipManager.sharedInstance().mouseMoved(e);
+            } else {
+                e = new MouseEvent
+                    (JSVGCanvas.this,
+                     MouseEvent.MOUSE_MOVED,
+                     System.currentTimeMillis(),
+                     0,
+                     locationListener.getLastX(),
+                     locationListener.getLastY(),
+                     0,
+                     false);
+                ToolTipManager.sharedInstance().mouseMoved(e);
+            }
         }
     }
 }
diff --git a/sources/org/apache/batik/swing/JSVGScrollPane.java b/sources/org/apache/batik/swing/JSVGScrollPane.java
index f9cb1de..f52e725 100644
--- a/sources/org/apache/batik/swing/JSVGScrollPane.java
+++ b/sources/org/apache/batik/swing/JSVGScrollPane.java
@@ -51,6 +51,7 @@
 import org.apache.batik.swing.gvt.JGVTComponentListener;
 import org.apache.batik.swing.svg.SVGDocumentLoaderAdapter;
 import org.apache.batik.swing.svg.SVGDocumentLoaderEvent;
+import org.apache.batik.swing.svg.SVGDocumentLoaderListener;
 import org.apache.batik.swing.svg.GVTTreeBuilderListener;
 import org.apache.batik.swing.svg.GVTTreeBuilderEvent;
 
@@ -132,11 +133,10 @@
         add(horizontalPanel, BorderLayout.SOUTH);
 		
         // inform of ZOOM events (to print sizes, such as in a status bar)
-        canvas.addSVGDocumentLoaderListener
-            (new SVGScrollDocumentLoaderListener());
+        canvas.addSVGDocumentLoaderListener(createLoadListener());
 		
         // canvas listeners
-        ScrollListener xlistener = new ScrollListener();
+        ScrollListener xlistener = createScrollListener();
         this.addComponentListener(xlistener);
         canvas.addJGVTComponentListener(xlistener);
         canvas.addGVTTreeBuilderListener(xlistener);
@@ -146,12 +146,27 @@
 
     /**
      * Scrollbar listener factory method so subclasses can
-     * use a subclass of SBListener if needed.
+     * override the default SBListener behaviour.
      */
     protected SBListener createScrollBarListener(boolean isVertical) {
         return new SBListener(isVertical);
     }
 
+    /**
+     * Factory method so subclasses can override the default listener behaviour
+     */
+    protected ScrollListener createScrollListener() {
+        return new ScrollListener();
+    }
+	
+
+    /**
+     * Factory method so subclasses can override the default load listener.
+     */
+    protected SVGDocumentLoaderListener createLoadListener() {
+        return new SVGScrollDocumentLoaderListener();
+    }
+	
     public JSVGCanvas getCanvas() {
         return canvas;
     }
@@ -320,8 +335,7 @@
         }// stateChanged()
     }// inner class SBListener
 	
-	
-	
+
     /** Handle scroll, zoom, and resize events */
     protected class ScrollListener extends ComponentAdapter 
         implements JGVTComponentListener, GVTTreeBuilderListener, 
@@ -343,14 +357,17 @@
         }// componentResized()
 		
 		
-        public void gvtBuildPrepare  (GVTTreeBuilderEvent e) { 
+        public void gvtBuildStarted  (GVTTreeBuilderEvent e) { 
             isReady = false;
+            // Start by assuming we won't need them.
+            vertical       .setVisible(false);
+            horizontalPanel.setVisible(false);
+            cornerBox      .setVisible(false);
         }
         public void gvtBuildCompleted(GVTTreeBuilderEvent e)
         {
             isReady = true;
             viewBox = null;   // new document forget old viewBox if any.
-            resizeScrollBars();
         }// gvtRenderingCompleted()
 		
         public void updateCompleted(UpdateManagerEvent e) { 
@@ -372,7 +389,6 @@
 
         public void gvtBuildCancelled(GVTTreeBuilderEvent e) { }
         public void gvtBuildFailed   (GVTTreeBuilderEvent e) { }
-        public void gvtBuildStarted  (GVTTreeBuilderEvent e) { }
 
         public void managerStarted  (UpdateManagerEvent e) { }
         public void managerSuspended(UpdateManagerEvent e) { }
diff --git a/sources/org/apache/batik/swing/gvt/AbstractJGVTComponent.java b/sources/org/apache/batik/swing/gvt/AbstractJGVTComponent.java
index 284c3cb..305d3ce 100755
--- a/sources/org/apache/batik/swing/gvt/AbstractJGVTComponent.java
+++ b/sources/org/apache/batik/swing/gvt/AbstractJGVTComponent.java
@@ -25,7 +25,10 @@
 import java.awt.Graphics2D;
 import java.awt.Rectangle;
 import java.awt.RenderingHints;
+import java.awt.Toolkit;
 import java.awt.Shape;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.StringSelection;
 import java.awt.event.ComponentAdapter;
 import java.awt.event.ComponentEvent;
 import java.awt.event.InputEvent;
@@ -37,6 +40,7 @@
 import java.awt.geom.AffineTransform;
 import java.awt.geom.NoninvertibleTransformException;
 import java.awt.image.BufferedImage;
+import java.text.CharacterIterator;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -46,6 +50,8 @@
 
 import org.apache.batik.gvt.GraphicsNode;
 import org.apache.batik.gvt.event.AWTEventDispatcher;
+import org.apache.batik.gvt.event.SelectionAdapter;
+import org.apache.batik.gvt.event.SelectionEvent;
 import org.apache.batik.gvt.renderer.ConcreteImageRendererFactory;
 import org.apache.batik.gvt.renderer.ImageRenderer;
 import org.apache.batik.gvt.renderer.ImageRendererFactory;
@@ -178,6 +184,14 @@
     protected boolean selectableText;
 
     /**
+     * Whether the JGVTComponent should adhere to 'Unix' text
+     * selection semantics where as soon as text is selected it
+     * is copied to the clipboard.  If users want Mac/Windows
+     * behaviour they need to handle selections them selves.
+     */
+    protected boolean useUnixTextSelection = true;
+
+    /**
      * Whether to suspend interactions.
      */
     protected boolean suspendInteractions;
@@ -196,7 +210,7 @@
 
     /**
      * Creates a new abstract JGVTComponent.
-     * @param eventEnabled Whether the GVT tree should be reactive
+     * @param eventsEnabled Whether the GVT tree should be reactive
      *        to mouse and key events.
      * @param selectableText Whether the text should be selectable.
      *        if eventEnabled is false, this flag is ignored.
@@ -233,15 +247,42 @@
         addMouseMotionListener(listener);
     }
 
+    /**
+     * Turn off all 'interactor' objects (pan, zoom, etc) if
+     * 'b' is true, turn them on if 'b' is false.
+     */
     public void setDisableInteractions(boolean b) {
         disableInteractions = b;
     }
 
+    /**
+     * Returns true if all 'interactor' objects 
+     * (pan, zoom, etc) are disabled.
+     */
     public boolean getDisableInteractions() {
         return disableInteractions;
     }
 
     /**
+     * If 'b' is true text selections will copied to
+     * the clipboard immediately.  If 'b' is false
+     * then nothing will be done when selections are
+     * made (the application is responsable for copying
+     * the selection in response to user actions).
+     */
+    public void setUseUnixTextSelection(boolean b) {
+        useUnixTextSelection = b;
+    }
+
+    /**
+     * Returns true if the canvas will copy selections
+     * to the clipboard when they are completed.
+     */
+    public void getUseUnixTextSelection(boolean b) {
+        useUnixTextSelection = b;
+    }
+
+    /**
      * Returns the interactor list.
      */
     public List getInteractors() {
@@ -331,6 +372,8 @@
             if (selectableText) {
                 textSelectionManager =
                     new TextSelectionManager(this, eventDispatcher);
+                textSelectionManager.addSelectionListener
+                    (new UnixTextSelectionListener());
             }
         }
     }
@@ -340,6 +383,15 @@
     ////////////////////////////////////////////////////////////////////////
 
     /**
+     * Returns the current Text selection manager for the Component.
+     * Users can register with this to be notifed of changes in
+     * the text selection.
+     */
+    public TextSelectionManager getTextSelectionManager() {
+        return textSelectionManager;
+    }
+
+    /**
      * Sets the color of the selection overlay to the specified color.
      *
      * @param color the new color of the selection overlay
@@ -1157,4 +1209,52 @@
             }
         }
     }
+
+    protected class UnixTextSelectionListener 
+        extends SelectionAdapter {
+        
+        public void selectionDone(SelectionEvent evt) {
+            if (!useUnixTextSelection) return;
+
+            Object o = evt.getSelection();
+            if (!(o instanceof CharacterIterator))
+                return;
+            CharacterIterator iter = (CharacterIterator) o;
+
+            // first see if we can access the clipboard
+            SecurityManager securityManager;
+            securityManager = System.getSecurityManager();
+            if (securityManager != null) {
+                try {
+                    securityManager.checkSystemClipboardAccess();
+                } catch (SecurityException e) {
+                    return; // Can't access clipboard.
+                }
+            }
+
+            int sz = iter.getEndIndex()-iter.getBeginIndex();
+            if (sz == 0) return;
+
+            char[] cbuff = new char[sz];
+            cbuff[0] = iter.first();
+            for (int i=1; i<cbuff.length;++i) {
+                cbuff[i] = iter.next();
+            }
+            final String strSel = new String(cbuff);
+            // HACK: getSystemClipboard sometimes deadlocks on
+            // linux when called from the AWT Thread. The Thread
+            // creation prevents that.
+            new Thread() {
+                public void run() {
+                    Clipboard cb;
+                    cb = Toolkit.getDefaultToolkit().getSystemClipboard();
+                    StringSelection sel;
+                    sel = new StringSelection(strSel);
+                    cb.setContents(sel, sel);
+                }
+            }.start();
+        }
+    }
+
+
 }
diff --git a/sources/org/apache/batik/swing/gvt/GVTTreeRenderer.java b/sources/org/apache/batik/swing/gvt/GVTTreeRenderer.java
index f280e25..3748ad3 100755
--- a/sources/org/apache/batik/swing/gvt/GVTTreeRenderer.java
+++ b/sources/org/apache/batik/swing/gvt/GVTTreeRenderer.java
@@ -79,7 +79,8 @@
      * @param usr2dev The user to device transform.
      * @param dbuffer Whether the double buffering should be enabled.
      * @param aoi The area of interest in the renderer space units.
-     * @param width&nbsp;height The offscreen buffer size.
+     * @param width The offscreen buffer width.
+     * @param height The offscreen buffer height.
      */
     public GVTTreeRenderer(ImageRenderer r, AffineTransform usr2dev,
                            boolean dbuffer,
diff --git a/sources/org/apache/batik/swing/gvt/TextSelectionManager.java b/sources/org/apache/batik/swing/gvt/TextSelectionManager.java
index 7ef0eec..d379bdf 100644
--- a/sources/org/apache/batik/swing/gvt/TextSelectionManager.java
+++ b/sources/org/apache/batik/swing/gvt/TextSelectionManager.java
@@ -100,6 +100,11 @@
     protected boolean xorMode = false;
 
     /**
+     * The current selection or null if there is none.
+     */
+    Object selection = null;
+
+    /**
      * Creates a new TextSelectionManager.
      */
     public TextSelectionManager(AbstractJGVTComponent comp,
@@ -190,6 +195,13 @@
     }
 
     /**
+     * Returns the current text selection or null if there is none.
+     */
+    public Object getSelection() {
+        return selection;
+    }
+
+    /**
      * Sets the selected text
      */
     public void setSelection(Mark start, Mark end) {
@@ -222,9 +234,7 @@
         }
 
         public void mouseReleased(GraphicsNodeMouseEvent evt) {
-            if (evt.getSource() instanceof Selectable) {
-                textSelector.mouseReleased(evt);
-            }
+            textSelector.mouseReleased(evt);
         }
 
         public void mouseEntered(GraphicsNodeMouseEvent evt) {
@@ -252,11 +262,7 @@
             }
         }
 
-        public void mouseMoved(GraphicsNodeMouseEvent evt) {
-            if (evt.getSource() instanceof Selectable) {
-                textSelector.mouseMoved(evt);
-            }
-        }
+        public void mouseMoved(GraphicsNodeMouseEvent evt) { }
     }
 
     /**
@@ -265,6 +271,7 @@
     protected class TextSelectionListener implements SelectionListener {
         public void selectionDone(SelectionEvent e) {
             selectionChanged(e);
+            selection = e.getSelection();
         }
         public void selectionCleared(SelectionEvent e) {
             selectionStarted(e);
@@ -275,6 +282,7 @@
                 selectionHighlight = null;
                 component.repaint(r);
             }
+            selection = null;
         }
         public void selectionChanged(SelectionEvent e) {
             Rectangle r = null;
diff --git a/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java b/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java
index be511a3..9ab94ea 100755
--- a/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java
+++ b/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java
@@ -207,16 +207,29 @@
 
     /**
      * Means that all document must be considered as dynamic.
+     *
+     * Indicates that all DOM listeners should be registered. This supports
+     * 'interactivity' (anchors and cursors), as well as DOM modifications
+     * listeners to update the GVT rendering tree.
      */
     public final static int ALWAYS_DYNAMIC = 1; 
 
     /**
      * Means that all document must be considered as static.
+     *
+     * Indicates that no DOM listeners should be registered.
+     * In this case the generated GVT tree should be totally
+     * independent of the DOM tree (in practice text holds
+     * references to the source text elements for font resolution).
      */
     public final static int ALWAYS_STATIC = 2;
 
     /**
      * Means that all document must be considered as interactive.
+     *
+     * Indicates that DOM listeners should be registered to support,
+     * 'interactivity' this includes anchors and cursors, but does not
+     * include support for DOM modifications.
      */
     public final static int ALWAYS_INTERACTIVE = 3;
 
@@ -345,7 +358,7 @@
     /**
      * Creates a new AbstractJSVGComponent.
      * @param ua a SVGUserAgent instance or null.
-     * @param eventEnabled Whether the GVT tree should be reactive
+     * @param eventsEnabled Whether the GVT tree should be reactive
      *        to mouse and key events.
      * @param selectableText Whether the text should be selectable.
      */
@@ -698,7 +711,7 @@
     /**
      * Starts a tree builder.
      */
-    private void startGVTTreeBuilder() {
+    protected void startGVTTreeBuilder() {
         gvtTreeBuilder = nextGVTTreeBuilder;
         nextGVTTreeBuilder = null;
         gvtTreeBuilder.start();
@@ -753,7 +766,7 @@
             (fragmentIdentifier, elt);
         CanvasGraphicsNode cgn = getCanvasGraphicsNode(gn);
         cgn.setViewingTransform(at);
-        viewingTransform = at;
+        viewingTransform = null;
         initialTransform = new AffineTransform();
         setRenderingTransform(initialTransform, false);
         jsvgComponentListener.updateMatrix(initialTransform);
@@ -823,6 +836,19 @@
         return (CanvasGraphicsNode)gn;
     }
 
+    public AffineTransform getViewingTransform() {
+        AffineTransform vt;
+        synchronized (this) {
+            vt = viewingTransform;
+            if (vt == null) {
+                CanvasGraphicsNode cgn = getCanvasGraphicsNode();
+                if (cgn != null)
+                    vt = cgn.getViewingTransform();
+            }
+        }
+        return vt;
+    }
+
     /**
      * Returns the transform from viewBox coords to screen coords
      */
@@ -830,8 +856,9 @@
         AffineTransform at = getRenderingTransform();
         if (at == null) at = new AffineTransform();
         else            at = new AffineTransform(at);
-        if (viewingTransform != null) {
-            at.concatenate(viewingTransform);
+        AffineTransform vt = getViewingTransform();
+        if (vt != null) {
+            at.concatenate(vt);
         }
         return at;
     }
@@ -880,7 +907,7 @@
             if (d.height < 1) d.height = 1;
             final AffineTransform at = calculateViewingTransform
                 (fragmentIdentifier, elt);
-            AffineTransform vt = viewingTransform;
+            AffineTransform vt = getViewingTransform();
             if (at.equals(vt)) {
                 // No new transform
                 // Only repaint if size really changed.
@@ -927,12 +954,18 @@
                     (AffineTransform.getTranslateInstance(dx, dy));
                 setRenderingTransform(rendAT, false);
             }
-            viewingTransform = at;
+            synchronized (this) {
+                viewingTransform = at;
+            }
             Runnable r = new Runnable() {
                     AffineTransform myAT = at;
                     CanvasGraphicsNode myCGN = getCanvasGraphicsNode();
                     public void run() {
-                        myCGN.setViewingTransform(myAT);
+                        synchronized (AbstractJSVGComponent.this) {
+                            myCGN.setViewingTransform(myAT);
+                            if (viewingTransform == myAT) 
+                                viewingTransform = null;
+                        }
                     }
                 };
             UpdateManager um = getUpdateManager();
@@ -1204,7 +1237,7 @@
 
             final boolean dispatchZoom    = (currScale != prevScale);
             final boolean dispatchScroll  = ((currTransX != prevTransX) ||
-                                             (currTransX != prevTransX));
+                                             (currTransY != prevTransY));
             if (isDynamicDocument &&
                 (updateManager != null) && updateManager.isRunning()) {
                 updateManager.getUpdateRunnableQueue().invokeLater
@@ -2442,7 +2475,7 @@
         }
         
         /**
-         * Informs the user agent that the text selection should changed.
+         * Informs the user agent that the text selection should be changed.
          * @param start The Mark for the start of the selection.
          * @param end   The Mark for the end of the selection.
          */
@@ -2459,9 +2492,7 @@
         }
 
         /**
-         * Informs the user agent that the text selection should changed.
-         * @param start The Mark for the start of the selection.
-         * @param end   The Mark for the end of the selection.
+         * Informs the user agent that the text should be deselected.
          */
         public void deselectAll() {
             if (EventQueue.isDispatchThread()) {
@@ -2692,11 +2723,11 @@
          * 
          * @param scriptType type of script, as found in the 
          *        type attribute of the &lt;script&gt; element.
-         * @param scriptURL url for the script, as defined in
+         * @param scriptPURL url for the script, as defined in
          *        the script's xlink:href attribute. If that
          *        attribute was empty, then this parameter should
          *        be null
-         * @param docURL url for the document into which the 
+         * @param docPURL url for the document into which the 
          *        script was found.
          */
         public ScriptSecurity getScriptSecurity(String scriptType,
@@ -2733,11 +2764,11 @@
          *
          * @param scriptType type of script, as found in the 
          *        type attribute of the &lt;script&gt; element.
-         * @param scriptURL url for the script, as defined in
+         * @param scriptPURL url for the script, as defined in
          *        the script's xlink:href attribute. If that
          *        attribute was empty, then this parameter should
          *        be null
-         * @param docURL url for the document into which the 
+         * @param docPURL url for the document into which the 
          *        script was found.
          */
         public void checkLoadScript(String scriptType,
@@ -2775,11 +2806,11 @@
          * Returns the security settings for the given resource
          * url and document url
          * 
-         * @param resourceURL url for the resource, as defined in
+         * @param resourcePURL url for the resource, as defined in
          *        the resource's xlink:href attribute. If that
          *        attribute was empty, then this parameter should
          *        be null
-         * @param docURL url for the document into which the 
+         * @param docPURL url for the document into which the 
          *        resource was found.
          */
         public ExternalResourceSecurity 
@@ -2812,12 +2843,12 @@
          * on the ExternalResourceSecurity strategy returned by 
          * getExternalResourceSecurity.
          *
-         * @param scriptURL url for the script, as defined in
-         *        the script's xlink:href attribute. If that
+         * @param resourceURL url for the resource, as defined in
+         *        the resource's xlink:href attribute. If that
          *        attribute was empty, then this parameter should
          *        be null
          * @param docURL url for the document into which the 
-         *        script was found.
+         *        resource was found.
          */
         public void 
             checkLoadExternalResource(ParsedURL resourceURL,
@@ -3374,12 +3405,12 @@
          * on the ExternalResourceSecurity strategy returned by 
          * getExternalResourceSecurity.
          *
-         * @param scriptURL url for the script, as defined in
-         *        the script's xlink:href attribute. If that
+         * @param resourceURL url for the resource, as defined in
+         *        the resource's xlink:href attribute. If that
          *        attribute was empty, then this parameter should
          *        be null
          * @param docURL url for the document into which the 
-         *        script was found.
+         *        resource was found.
          */
         public void 
             checkLoadExternalResource(ParsedURL resourceURL,
diff --git a/sources/org/apache/batik/swing/svg/SVGFileFilter.java b/sources/org/apache/batik/swing/svg/SVGFileFilter.java
index 2136356..d4a3501 100755
--- a/sources/org/apache/batik/swing/svg/SVGFileFilter.java
+++ b/sources/org/apache/batik/swing/svg/SVGFileFilter.java
@@ -25,7 +25,7 @@
  * This implementation of FileFilter will allows SVG files
  * with extention '.svg' or '.svgz'.
  *
- * @author <a href="mailto:vincent.hardy@eng.sun.com>Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @author <a href="mailto:cjolif@ilog.fr">Christophe Jolif</a>
  * @version $Id$
  */
diff --git a/sources/org/apache/batik/swing/svg/SVGUpdateOverlay.java b/sources/org/apache/batik/swing/svg/SVGUpdateOverlay.java
index fdab157..95eddb2 100644
--- a/sources/org/apache/batik/swing/svg/SVGUpdateOverlay.java
+++ b/sources/org/apache/batik/swing/svg/SVGUpdateOverlay.java
@@ -32,7 +32,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class SVGUpdateOverlay implements Overlay {
diff --git a/sources/org/apache/batik/swing/svg/SVGUserAgent.java b/sources/org/apache/batik/swing/svg/SVGUserAgent.java
index 30f22f5..080e4f2 100644
--- a/sources/org/apache/batik/swing/svg/SVGUserAgent.java
+++ b/sources/org/apache/batik/swing/svg/SVGUserAgent.java
@@ -217,12 +217,12 @@
      * on the ExternalResourceSecurity strategy returned by 
      * getExternalResourceSecurity.
      *
-     * @param scriptURL url for the script, as defined in
-     *        the script's xlink:href attribute. If that
+     * @param resourceURL url for the script, as defined in
+     *        the resource's xlink:href attribute. If that
      *        attribute was empty, then this parameter should
      *        be null
      * @param docURL url for the document into which the 
-     *        script was found.
+     *        resource was found.
      */
     void checkLoadExternalResource(ParsedURL resourceURL,
                                    ParsedURL docURL) throws SecurityException;
diff --git a/sources/org/apache/batik/swing/svg/SVGUserAgentAdapter.java b/sources/org/apache/batik/swing/svg/SVGUserAgentAdapter.java
index b6b07ac..1671bbd 100644
--- a/sources/org/apache/batik/swing/svg/SVGUserAgentAdapter.java
+++ b/sources/org/apache/batik/swing/svg/SVGUserAgentAdapter.java
@@ -45,7 +45,7 @@
  * most of the alert,prompt,etc methods are totally useless.
  * In a GUI environment you probably want to use SVGUserAgentGUIAdapter.
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class SVGUserAgentAdapter implements SVGUserAgent {
@@ -332,12 +332,12 @@
      * on the ExternalResourceSecurity strategy returned by 
      * getExternalResourceSecurity.
      *
-     * @param scriptURL url for the script, as defined in
-     *        the script's xlink:href attribute. If that
+     * @param resourceURL url for the resource, as defined in
+     *        the resource's xlink:href attribute. If that
      *        attribute was empty, then this parameter should
      *        be null
      * @param docURL url for the document into which the 
-     *        script was found.
+     *        resource was found.
      */
     public void 
         checkLoadExternalResource(ParsedURL resourceURL,
diff --git a/sources/org/apache/batik/swing/svg/SVGUserAgentGUIAdapter.java b/sources/org/apache/batik/swing/svg/SVGUserAgentGUIAdapter.java
index 36abc92..22f7345 100644
--- a/sources/org/apache/batik/swing/svg/SVGUserAgentGUIAdapter.java
+++ b/sources/org/apache/batik/swing/svg/SVGUserAgentGUIAdapter.java
@@ -29,7 +29,7 @@
  * Methods users may want to implement:
  *    displayMessage
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class SVGUserAgentGUIAdapter extends SVGUserAgentAdapter{
diff --git a/sources/org/apache/batik/transcoder/SVGAbstractTranscoder.java b/sources/org/apache/batik/transcoder/SVGAbstractTranscoder.java
index f047eb9..50f1224 100644
--- a/sources/org/apache/batik/transcoder/SVGAbstractTranscoder.java
+++ b/sources/org/apache/batik/transcoder/SVGAbstractTranscoder.java
@@ -242,16 +242,18 @@
         } else {
             String ref = new ParsedURL(uri).getRef();
 
-            try {
-                Px = ViewBox.getViewTransform(ref, root, width, height);
-            } catch (BridgeException ex) {
-                throw new TranscoderException(ex);
-            }
+            String viewBox = root.getAttributeNS
+                (null, SVGConstants.SVG_VIEW_BOX_ATTRIBUTE);
 
-            if (Px.isIdentity() && 
-                (width != docWidth || height != docHeight)) {
-                // The document has no viewBox, we need to resize it by hand.
-                // we want to keep the document size ratio
+            if ((ref != null) && (ref.length() != 0)) {
+                Px = ViewBox.getViewTransform(ref, root, width, height);
+            } else if ((viewBox != null) && (viewBox.length() != 0)) {
+                String aspectRatio = root.getAttributeNS
+                    (null, SVGConstants.SVG_PRESERVE_ASPECT_RATIO_ATTRIBUTE);
+                Px = ViewBox.getPreserveAspectRatioTransform
+                    (root, viewBox, aspectRatio, width, height);
+            } else {
+                // no viewBox has been specified, create a scale transform
                 float xscale, yscale;
                 xscale = width/docWidth;
                 yscale = height/docHeight;
diff --git a/sources/org/apache/batik/transcoder/TranscodingHints.java b/sources/org/apache/batik/transcoder/TranscodingHints.java
index 6c054d8..d2ff1af 100644
--- a/sources/org/apache/batik/transcoder/TranscodingHints.java
+++ b/sources/org/apache/batik/transcoder/TranscodingHints.java
@@ -120,7 +120,7 @@
      * Copies all of the mappings from the specified <tt>Map</tt>
      * to this <tt>TranscodingHints</tt>.
      *
-     * @param t mappings to be stored in this <tt>TranscodingHints</tt>.
+     * @param m mappings to be stored in this <tt>TranscodingHints</tt>.
      * @exception ClassCastException key is not of type
      * <tt>TranscodingHints.Key</tt>
      */
diff --git a/sources/org/apache/batik/transcoder/image/ImageTranscoder.java b/sources/org/apache/batik/transcoder/image/ImageTranscoder.java
index 74336a0..152fa78 100644
--- a/sources/org/apache/batik/transcoder/image/ImageTranscoder.java
+++ b/sources/org/apache/batik/transcoder/image/ImageTranscoder.java
@@ -143,7 +143,7 @@
      * Writes the specified image to the specified output.
      * @param img the image to write
      * @param output the output where to store the image
-     * @param TranscoderException if an error occured while storing the image
+     * @throws TranscoderException if an error occured while storing the image
      */
     public abstract void writeImage(BufferedImage img, TranscoderOutput output)
         throws TranscoderException;
diff --git a/sources/org/apache/batik/transcoder/image/JPEGTranscoder.java b/sources/org/apache/batik/transcoder/image/JPEGTranscoder.java
index b92d65d..b644195 100644
--- a/sources/org/apache/batik/transcoder/image/JPEGTranscoder.java
+++ b/sources/org/apache/batik/transcoder/image/JPEGTranscoder.java
@@ -59,7 +59,7 @@
      * Writes the specified image to the specified output.
      * @param img the image to write
      * @param output the output where to store the image
-     * @param TranscoderException if an error occured while storing the image
+     * @throws TranscoderException if an error occured while storing the image
      */
     public void writeImage(BufferedImage img, TranscoderOutput output)
             throws TranscoderException {
diff --git a/sources/org/apache/batik/transcoder/image/PNGTranscoder.java b/sources/org/apache/batik/transcoder/image/PNGTranscoder.java
index 76607d5..8cd888d 100644
--- a/sources/org/apache/batik/transcoder/image/PNGTranscoder.java
+++ b/sources/org/apache/batik/transcoder/image/PNGTranscoder.java
@@ -61,7 +61,7 @@
      * Writes the specified image to the specified output.
      * @param img the image to write
      * @param output the output where to store the image
-     * @param TranscoderException if an error occured while storing the image
+     * @throws TranscoderException if an error occured while storing the image
      */
     public void writeImage(BufferedImage img, TranscoderOutput output)
             throws TranscoderException {
diff --git a/sources/org/apache/batik/transcoder/image/TIFFTranscoder.java b/sources/org/apache/batik/transcoder/image/TIFFTranscoder.java
index 4b8f69f..ea5722b 100644
--- a/sources/org/apache/batik/transcoder/image/TIFFTranscoder.java
+++ b/sources/org/apache/batik/transcoder/image/TIFFTranscoder.java
@@ -68,7 +68,7 @@
      * Writes the specified image to the specified output.
      * @param img the image to write
      * @param output the output where to store the image
-     * @param TranscoderException if an error occured while storing the image
+     * @throws TranscoderException if an error occured while storing the image
      */
     public void writeImage(BufferedImage img, TranscoderOutput output)
             throws TranscoderException {
diff --git a/sources/org/apache/batik/transcoder/svg2svg/OutputManager.java b/sources/org/apache/batik/transcoder/svg2svg/OutputManager.java
index c4aa091..896dfaf 100755
--- a/sources/org/apache/batik/transcoder/svg2svg/OutputManager.java
+++ b/sources/org/apache/batik/transcoder/svg2svg/OutputManager.java
@@ -88,7 +88,8 @@
 
     /**
      * Creates a new output manager.
-     * @param s The scanner used for input tokenization.
+     * @param pp The PrettyPrinter used for formatting the output.
+     * @param w The Writer to write the output to.
      */
     public OutputManager(PrettyPrinter pp, Writer w) {
         prettyPrinter = pp;
@@ -155,7 +156,6 @@
     /**
      * Prints top level white spaces.
      * @param text The space text.
-     * @param opt whether the space is optional.
      */
     public void printTopSpaces(char[] text) throws IOException {
         if (prettyPrinter.getFormat()) {
@@ -182,7 +182,7 @@
             if (column + text.length + 3 < prettyPrinter.getDocumentWidth()) {
                 printCharacters(text);
             } else {
-                formatText(text, margin.toString());
+                formatText(text, margin.toString(), false);
                 printCharacter(' ');
             }
             if (column + 3 > prettyPrinter.getDocumentWidth()) {
@@ -403,7 +403,14 @@
     /**
      * Prints an entity reference.
      */
-    public void printEntityReference(char[] name) throws IOException {
+    public void printEntityReference(char[] name, 
+                                     boolean first) throws IOException {
+        if ((prettyPrinter.getFormat()) &&
+            (xmlSpace.get(0) != Boolean.TRUE) &&
+            first) {
+            printNewline();
+            printString(margin.toString());
+        }
         printCharacter('&');
         printCharacters(name);
         printCharacter(';');
@@ -412,7 +419,25 @@
     /**
      * Prints a character entity reference.
      */
-    public void printCharacterEntityReference(char[] code) throws IOException {
+    public void printCharacterEntityReference
+        (char[] code, boolean first, boolean preceedingSpace) 
+        throws IOException {
+        if ((prettyPrinter.getFormat()) &&
+            (xmlSpace.get(0) != Boolean.TRUE)) {
+
+            if (first) {
+                printNewline();
+                printString(margin.toString());
+            } else if (preceedingSpace) {
+                int endCol = column + code.length + 3;
+                if (endCol > prettyPrinter.getDocumentWidth()){
+                    printNewline();
+                    printString(margin.toString());
+                } else {
+                    printCharacter(' ');
+                }
+            }
+        }
         printString("&#");
         printCharacters(code);
         printCharacter(';');
@@ -551,27 +576,35 @@
     /**
      * Prints the character data of an element content.
      */
-    public void printCharacterData(char[] data) throws IOException {
-        if (prettyPrinter.getFormat()) {
-            canIndent = true;
-            if (isWhiteSpace(data)) {
-                int nl = newlines(data);
-                for (int i = 0; i < nl - 1; i++) {
-                    printNewline();
-                }
-            } else {
-                if (xmlSpace.get(0) == Boolean.TRUE) {
-                    printCharacters(data);
-                    canIndent = false;
-                } else {
-                    printNewline();
-                    printString(margin.toString());
-                    formatText(data, margin.toString());
-                }
-            }
-        } else {
+    public boolean printCharacterData(char[] data, 
+                                      boolean first,
+                                      boolean preceedingSpace) 
+        throws IOException {
+        if (!prettyPrinter.getFormat()) {
             printCharacters(data);
+            return false;
         }
+
+        canIndent = true;
+        if (isWhiteSpace(data)) {
+            int nl = newlines(data);
+            for (int i = 0; i < nl - 1; i++) {
+                printNewline();
+            }
+            return true;
+        }
+
+        if (xmlSpace.get(0) == Boolean.TRUE) {
+            printCharacters(data);
+            canIndent = false;
+            return false;
+        }
+
+        if (first) {
+            printNewline();
+            printString(margin.toString());
+        }
+        return formatText(data, margin.toString(), preceedingSpace);
     }
 
     /**
@@ -714,9 +747,10 @@
     /**
      * Formats the given text.
      */
-    protected void formatText(char[] text, String margin) throws IOException {
+    protected boolean formatText(char[] text, String margin,
+                                 boolean preceedingSpace) throws IOException {
         int i = 0;
-
+        boolean startsWithSpace = preceedingSpace;
         loop: while (i < text.length) {
             for (;;) {
                 if (i >= text.length) {
@@ -725,6 +759,7 @@
                 if (!XMLUtilities.isXMLSpace(text[i])) {
                     break;
                 }
+                startsWithSpace = true;
                 i++;
             }
             StringBuffer sb = new StringBuffer();
@@ -735,28 +770,26 @@
                 sb.append(text[i++]);
             }
             if (sb.length() == 0) {
-                break;
+                return startsWithSpace;
             }
-            if (column + sb.length() >= prettyPrinter.getDocumentWidth() - 1) {
-                if (margin.length() + sb.length() <
-                    prettyPrinter.getDocumentWidth() - 1 ||
-                    margin.length() < column) {
+            if (startsWithSpace) {
+                // Consider reformatting ws so things look nicer.
+                int endCol = column + sb.length();
+                if ((endCol >= prettyPrinter.getDocumentWidth() - 1) &&
+                    ((margin.length() + sb.length() <
+                      prettyPrinter.getDocumentWidth() - 1) ||
+                     (margin.length() < column))) {
                     printNewline();
                     printString(margin);
-                    printString(sb.toString());
-                } else {
-                    if (column >= margin.length()) {
-                        printCharacter(' ');
-                    }
-                    printString(sb.toString());
-                }
-            } else {
-                if (column > margin.length()) {
+                } else if (column > margin.length()) {
+                    // Don't print space at start of new line.
                     printCharacter(' ');
                 }
-                printString(sb.toString());
             }
+            printString(sb.toString());
+            startsWithSpace = false;
         }
+        return startsWithSpace;
     }
 
     /**
diff --git a/sources/org/apache/batik/transcoder/svg2svg/PrettyPrinter.java b/sources/org/apache/batik/transcoder/svg2svg/PrettyPrinter.java
index 8c3f821..a03aee1 100755
--- a/sources/org/apache/batik/transcoder/svg2svg/PrettyPrinter.java
+++ b/sources/org/apache/batik/transcoder/svg2svg/PrettyPrinter.java
@@ -824,11 +824,12 @@
     /**
      * Prints an element.
      */
-    protected void printElement()
+    protected String printElement()
         throws TranscoderException,
                XMLException,
                IOException {
         char[] name = getCurrentValue();
+        String nameStr = new String(name);
         List attributes = new LinkedList();
         char[] space = null;
 
@@ -913,7 +914,7 @@
         case LexicalUnits.END_CHAR:
             output.printCharacter('>');
             type = scanner.next();
-            printContent();
+            printContent(allowSpaceAtStart(nameStr));
             if (type != LexicalUnits.END_TAG) {
                 throw fatalError("end.tag", null);
             }
@@ -934,29 +935,46 @@
         }
 
         type = scanner.next();
+        return nameStr;
+    }
+
+    boolean allowSpaceAtStart(String tagName) {
+        return true;
+        /**
+         * This would be a real hack for SVG.  This should be
+         * driven by a configuration paramater as well as
+         * needing to be really namespace aware...
+         */
+        // return !(tagName.equals("tspan")||
+        //         tagName.endsWith(":tspan"));
     }
 
     /**
      * Prints the content of an element.
      */
-    protected void printContent()
+    protected void printContent(boolean spaceAtStart)
         throws TranscoderException,
                XMLException,
                IOException {
+        boolean preceedingSpace = false;
         content: for (;;) {
             switch (type) {
             case LexicalUnits.COMMENT:
                 output.printComment(getCurrentValue());
                 scanner.clearBuffer();
                 type = scanner.next();
+                preceedingSpace = false;
                 break;
             case LexicalUnits.PI_START:
                 printPI();
+                preceedingSpace = false;
                 break;
             case LexicalUnits.CHARACTER_DATA:
-                output.printCharacterData(getCurrentValue());
+                preceedingSpace = output.printCharacterData
+                    (getCurrentValue(), spaceAtStart, preceedingSpace);
                 scanner.clearBuffer();
                 type = scanner.next();
+                spaceAtStart = false;
                 break;
             case LexicalUnits.CDATA_START:
                 type = scanner.next();
@@ -969,19 +987,28 @@
                 }
                 scanner.clearBuffer();
                 type = scanner.next();
+                preceedingSpace = false;
+                spaceAtStart = false;
                 break;
             case LexicalUnits.START_TAG:
-                printElement();
+                String name = printElement();
+                spaceAtStart = allowSpaceAtStart(name);
                 break;
             case LexicalUnits.CHARACTER_REFERENCE:
-                output.printCharacterEntityReference(getCurrentValue());
+                output.printCharacterEntityReference(getCurrentValue(),
+                                                     spaceAtStart,
+                                                     preceedingSpace);
                 scanner.clearBuffer();
                 type = scanner.next();
+                spaceAtStart = false;
+                preceedingSpace = false;
                 break;
             case LexicalUnits.ENTITY_REFERENCE:
-                output.printEntityReference(getCurrentValue());
+                output.printEntityReference(getCurrentValue(), spaceAtStart);
                 scanner.clearBuffer();
                 type = scanner.next();
+                spaceAtStart = false;
+                preceedingSpace = false;
                 break;
             default:
                 break content;
diff --git a/sources/org/apache/batik/util/ApplicationSecurityEnforcer.java b/sources/org/apache/batik/util/ApplicationSecurityEnforcer.java
index b5d436c..860b4cc 100644
--- a/sources/org/apache/batik/util/ApplicationSecurityEnforcer.java
+++ b/sources/org/apache/batik/util/ApplicationSecurityEnforcer.java
@@ -110,7 +110,8 @@
     protected BatikSecurityManager lastSecurityManagerInstalled;
 
     /**
-     * @param appClass class of the applications's main entry point
+     * Creates a new ApplicationSecurityEnforcer.
+     * @param appMainClass class of the applications's main entry point
      * @param securityPolicy resource for the security policy which 
      *        should be enforced for the application. 
      * @param appJarFile the Jar file into which the application is
@@ -127,7 +128,8 @@
 
 
     /**
-     * @param appClass class of the applications's main entry point
+     * Creates a new ApplicationSecurityEnforcer.
+     * @param appMainClass class of the applications's main entry point
      * @param securityPolicy resource for the security policy which 
      *        should be enforced for the application. 
      */
diff --git a/sources/org/apache/batik/util/Base64DecodeStream.java b/sources/org/apache/batik/util/Base64DecodeStream.java
index fd14db8..9e71a03 100644
--- a/sources/org/apache/batik/util/Base64DecodeStream.java
+++ b/sources/org/apache/batik/util/Base64DecodeStream.java
@@ -40,8 +40,8 @@
  *    "Base64DecodeStream: Bad Padding byte (1)."
  * </pre>
  *
- * @author <a href="thomas.deweese@kodak.com">Thomas DeWeese</a>
- * @author <a href="vincent.hardy@eng.sun.com">Vincent Hardy</a>
+ * @author <a href="mailto:thomas.deweese@kodak.com">Thomas DeWeese</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @author      Chuck McManis
  * @version $Id$
  */
diff --git a/sources/org/apache/batik/util/Base64EncoderStream.java b/sources/org/apache/batik/util/Base64EncoderStream.java
index 13db73f..f5d0113 100644
--- a/sources/org/apache/batik/util/Base64EncoderStream.java
+++ b/sources/org/apache/batik/util/Base64EncoderStream.java
@@ -29,8 +29,8 @@
  * This means that the encoded text will simply start with the first line
  * of encoded text and end with the last line of encoded text.
  *
- * @author <a href="deweese@apache.org">Thomas DeWeese</a>
- * @author <a href="vincent.hardy@eng.sun.com">Vincent Hardy</a>
+ * @author <a href="mailto:deweese@apache.org">Thomas DeWeese</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @author      Chuck McManis
  * @version $Id$
  */
diff --git a/sources/org/apache/batik/util/CleanerThread.java b/sources/org/apache/batik/util/CleanerThread.java
index 4a81252..5be4261 100644
--- a/sources/org/apache/batik/util/CleanerThread.java
+++ b/sources/org/apache/batik/util/CleanerThread.java
@@ -28,7 +28,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class CleanerThread extends Thread {
diff --git a/sources/org/apache/batik/util/DoublyLinkedList.java b/sources/org/apache/batik/util/DoublyLinkedList.java
index 65f88f6..99bc0d8 100644
--- a/sources/org/apache/batik/util/DoublyLinkedList.java
+++ b/sources/org/apache/batik/util/DoublyLinkedList.java
@@ -170,7 +170,7 @@
 
     /**
      * Removes 'head' from list and returns it. Returns null if list is empty.
-     * @returns current head element, next element becomes head.
+     * @return current head element, next element becomes head.
      */
     public Node pop() {
         if (head == null) return null;
@@ -182,7 +182,7 @@
 
     /**
      * Removes 'tail' from list and returns it. Returns null if list is empty.
-     * @returns current tail element.
+     * @return current tail element.
      */
     public Node unpush() {
         if (head == null) return null;
diff --git a/sources/org/apache/batik/util/EventDispatcher.java b/sources/org/apache/batik/util/EventDispatcher.java
index ba0aab9..720679c 100644
--- a/sources/org/apache/batik/util/EventDispatcher.java
+++ b/sources/org/apache/batik/util/EventDispatcher.java
@@ -24,7 +24,7 @@
 /**
  * Generic class to dispatch events in a highly relyable way
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class EventDispatcher {
diff --git a/sources/org/apache/batik/util/HaltingThread.java b/sources/org/apache/batik/util/HaltingThread.java
index adb6927..4a9849b 100644
--- a/sources/org/apache/batik/util/HaltingThread.java
+++ b/sources/org/apache/batik/util/HaltingThread.java
@@ -23,7 +23,7 @@
  * 'halt' method.  The Halt method simply sets a boolean that can be
  * checked periodically during expensive processing.
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public class HaltingThread extends Thread {
diff --git a/sources/org/apache/batik/util/ParsedURLData.java b/sources/org/apache/batik/util/ParsedURLData.java
index c50bac6..e24e3a5 100644
--- a/sources/org/apache/batik/util/ParsedURLData.java
+++ b/sources/org/apache/batik/util/ParsedURLData.java
@@ -52,7 +52,7 @@
 
     /**
      * GZIP header magic number bytes, like found in a gzipped
-     * files, which are encoded in Intel format (ie. little indian).
+     * files, which are encoded in Intel format (i&#x2e;e&#x2e; little indian).
      */
     public final static byte GZIP_MAGIC[] = {(byte)0x1f, (byte)0x8b};
 
@@ -178,7 +178,6 @@
             return new URL(protocol, host, port, file);
         }
 
-        // System.err.println("toString: " + toString());
         return new URL(toString());
     }
 
diff --git a/sources/org/apache/batik/util/ParsedURLDefaultProtocolHandler.java b/sources/org/apache/batik/util/ParsedURLDefaultProtocolHandler.java
index 3aa9b5e..90cad2b 100644
--- a/sources/org/apache/batik/util/ParsedURLDefaultProtocolHandler.java
+++ b/sources/org/apache/batik/util/ParsedURLDefaultProtocolHandler.java
@@ -60,7 +60,7 @@
     /**
      * Subclasses can override these method to construct alternate 
      * subclasses of ParsedURLData.
-     * @param the java.net.URL class we reference.
+     * @param url the java.net.URL class we reference.
      */
     protected ParsedURLData constructParsedURLData(URL url) {
         return new ParsedURLData(url);
diff --git a/sources/org/apache/batik/util/RunnableQueue.java b/sources/org/apache/batik/util/RunnableQueue.java
index 549c261..e3cfad0 100755
--- a/sources/org/apache/batik/util/RunnableQueue.java
+++ b/sources/org/apache/batik/util/RunnableQueue.java
@@ -71,6 +71,11 @@
      */
     protected Object stateLock = new Object();
 
+    /**
+     * Used to indicate if the queue was resumed while
+     * still running, so a 'resumed' event can be sent.
+     */
+    protected boolean wasResumed;
 
     /**
      * The Runnable objects list, also used as synchoronization point
@@ -78,6 +83,10 @@
      */
     protected DoublyLinkedList list = new DoublyLinkedList();
 
+    /**
+     * Count of preempt entries in queue, so preempt entries
+     * can be kept properly ordered.
+     */
     protected int preemptCount = 0;
 
     /**
@@ -131,21 +140,30 @@
 
                 // Mutex for suspention work.
                 synchronized (stateLock) {
-                    if (state != RUNNING) {
-                        state = SUSPENDED;
+                    if (state == RUNNING) {
 
-                        // notify suspendExecution in case it is
-                        // waiting til we shut down.
-                        stateLock.notifyAll();
-
-                        executionSuspended();
-
+                        if (wasResumed) {
+                            wasResumed = false;
+                            executionResumed();
+                        }
+                    } else {
+                        
                         while (state != RUNNING) {
                             state = SUSPENDED;
+
+                            // notify suspendExecution in case it is
+                            // waiting til we shut down.
+                            stateLock.notifyAll();
+
+                            executionSuspended();
+
                             // Wait until resumeExecution called.
-                            stateLock.wait();
+                            try {
+                                stateLock.wait();
+                            } catch(InterruptedException ie) { }
                         }
 
+                        wasResumed = false;
                         executionResumed();
                     }
                 }
@@ -190,7 +208,6 @@
                 l.unlock();
                 runnableInvoked(rable);
             }
-        } catch (InterruptedException e) {
         } finally {
             synchronized (this) {
                 runnableQueueThread = null;
@@ -321,10 +338,16 @@
             throw new IllegalStateException
                 ("RunnableQueue not started or has exited");
         }
+        // System.err.println("Suspend Called");
         synchronized (stateLock) {
-            if (state == SUSPENDED) 
-                // already suspended...
+            wasResumed = false;
+
+            if (state == SUSPENDED) {
+                // already suspended, notify stateLock so an event is
+                // generated.
+                stateLock.notifyAll();
                 return;
+            }
 
             if (state == RUNNING) {
                 state = SUSPENDING;
@@ -351,12 +374,15 @@
      * @throws IllegalStateException if getThread() is null.
      */
     public void resumeExecution() {
+        // System.err.println("Resume Called");
         if (runnableQueueThread == null) {
             throw new IllegalStateException
                 ("RunnableQueue not started or has exited");
         }
 
         synchronized (stateLock) {
+            wasResumed = true;
+
             if (state != RUNNING) {
                 state = RUNNING;
                 stateLock.notifyAll(); // wake it up.
@@ -425,6 +451,7 @@
      * Currently just notifies runHandler
      */
     protected synchronized void executionSuspended() {
+        // System.err.println("Suspend Sent");
         if (runHandler != null) {
             runHandler.executionSuspended(this);
         }
@@ -435,6 +462,7 @@
      * Currently just notifies runHandler
      */
     protected synchronized void executionResumed() {
+        // System.err.println("Resumed Sent");
         if (runHandler != null) {
             runHandler.executionResumed(this);
         }
@@ -539,7 +567,7 @@
          * unlock link and notify locker.  
          * Basic implementation does nothing.
          */
-        public void unlock() throws InterruptedException { return; }
+        public void unlock() { return; }
     }
 
     /**
@@ -578,11 +606,15 @@
         /**
          * unlocks this link.
          */
-        public synchronized void unlock() throws InterruptedException {
+        public synchronized void unlock() {
             while (!locked) {
-                // Wait until lock is called...
-                wait();
+                try {
+                    wait(); // Wait until lock is called...
+                } catch (InterruptedException ie) {
+                    // Loop again...
+                }
             }
+            locked = false;
             // Wake the locking thread...
             notify();
         }
diff --git a/sources/org/apache/batik/util/SVG12CSSConstants.java b/sources/org/apache/batik/util/SVG12CSSConstants.java
index 38ed3f7..05d55f5 100644
--- a/sources/org/apache/batik/util/SVG12CSSConstants.java
+++ b/sources/org/apache/batik/util/SVG12CSSConstants.java
@@ -22,7 +22,7 @@
  * This interface defines constants for CSS with SVG12.
  * Important: Constants must not contain uppercase characters.
  *
- * @author <a href="mailto:deweese@apache.org>deweese</a>
+ * @author <a href="mailto:deweese@apache.org">deweese</a>
  * @version $Id$
  */
 public interface SVG12CSSConstants extends CSSConstants {
diff --git a/sources/org/apache/batik/util/SVG12Constants.java b/sources/org/apache/batik/util/SVG12Constants.java
index 2989089..8ce5cd2 100644
--- a/sources/org/apache/batik/util/SVG12Constants.java
+++ b/sources/org/apache/batik/util/SVG12Constants.java
@@ -21,7 +21,7 @@
  * Define SVG 1.2 constants, such as tag names, attribute names and URI
  *
  * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
- * @author <a href="vincent.hardy@eng.sun.com">Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  * @version $Id$
  */
diff --git a/sources/org/apache/batik/util/SVGConstants.java b/sources/org/apache/batik/util/SVGConstants.java
index 8a14819..ef6549b 100644
--- a/sources/org/apache/batik/util/SVGConstants.java
+++ b/sources/org/apache/batik/util/SVGConstants.java
@@ -21,7 +21,7 @@
  * Define SVG constants, such as tag names, attribute names and URI
  *
  * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
- * @author <a href="vincent.hardy@eng.sun.com">Vincent Hardy</a>
+ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  * @version $Id$
  */
diff --git a/sources/org/apache/batik/util/gui/URIChooser.java b/sources/org/apache/batik/util/gui/URIChooser.java
index 74251c3..eb39512 100644
--- a/sources/org/apache/batik/util/gui/URIChooser.java
+++ b/sources/org/apache/batik/util/gui/URIChooser.java
@@ -49,7 +49,7 @@
 import org.apache.batik.util.gui.resource.ResourceManager;
 
 /**
- * This class is a dialog used to enter an URI or to choose a local file
+ * This class is a dialog used to enter an URI or to choose a local file.
  *
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  * @version $Id$
@@ -127,7 +127,7 @@
     protected String chosenPath;
 
     /**
-     * Creates a new URIChooser
+     * Creates a new URIChooser.
      * @param d the parent dialog
      */
     public URIChooser(JDialog d) {
@@ -136,9 +136,8 @@
     }
 
     /**
-     * Creates a new URIChooser
+     * Creates a new URIChooser.
      * @param f the parent frame
-     * @param okAction the action to associate to the ok button
      */
     public URIChooser(JFrame f) {
         super(f);
diff --git a/sources/org/apache/batik/util/gui/resource/ButtonFactory.java b/sources/org/apache/batik/util/gui/resource/ButtonFactory.java
index c357478..6903ed5 100644
--- a/sources/org/apache/batik/util/gui/resource/ButtonFactory.java
+++ b/sources/org/apache/batik/util/gui/resource/ButtonFactory.java
@@ -30,7 +30,7 @@
 
 /**
  * This class represents a button factory which builds
- * buttons from the content of a resource bundle.<br>
+ * buttons from the content of a resource bundle. <br>
  *
  * The resource entries format is (for a button named 'Button'):<br>
  * <pre>
diff --git a/sources/org/apache/batik/util/gui/resource/MenuFactory.java b/sources/org/apache/batik/util/gui/resource/MenuFactory.java
index ac19234..556f0f5 100644
--- a/sources/org/apache/batik/util/gui/resource/MenuFactory.java
+++ b/sources/org/apache/batik/util/gui/resource/MenuFactory.java
@@ -40,7 +40,7 @@
 
 /**
  * This class represents a menu factory which builds
- * menubars and menus from the content of a resource file.<br>
+ * menubars and menus from the content of a resource file. <br>
  *
  * The resource entries format is (for a menubar named 'MenuBar'):<br>
  * <pre>
diff --git a/sources/org/apache/batik/util/gui/resource/MissingListenerException.java b/sources/org/apache/batik/util/gui/resource/MissingListenerException.java
index 16b3cb8..e684a1d 100644
--- a/sources/org/apache/batik/util/gui/resource/MissingListenerException.java
+++ b/sources/org/apache/batik/util/gui/resource/MissingListenerException.java
@@ -40,7 +40,7 @@
      * Constructs a MissingListenerException with the specified information.
      * A detail message is a String that describes this particular exception.
      * @param s the detail message
-     * @param classname the name of the listener class
+     * @param className the name of the listener class
      * @param key the key for the missing listener.
      */
     public MissingListenerException(String s, String className, String key) {
diff --git a/sources/org/apache/batik/util/gui/resource/ResourceFormatException.java b/sources/org/apache/batik/util/gui/resource/ResourceFormatException.java
index 7bfc443..e40e698 100644
--- a/sources/org/apache/batik/util/gui/resource/ResourceFormatException.java
+++ b/sources/org/apache/batik/util/gui/resource/ResourceFormatException.java
@@ -40,7 +40,7 @@
      * Constructs a ResourceFormatException with the specified information.
      * A detail message is a String that describes this particular exception.
      * @param s the detail message
-     * @param classname the name of the resource class
+     * @param className the name of the resource class
      * @param key the key for the malformed resource.
      */
     public ResourceFormatException(String s, String className, String key) {
diff --git a/sources/org/apache/batik/util/gui/resource/ToolBarFactory.java b/sources/org/apache/batik/util/gui/resource/ToolBarFactory.java
index 4a110a4..cf91684 100644
--- a/sources/org/apache/batik/util/gui/resource/ToolBarFactory.java
+++ b/sources/org/apache/batik/util/gui/resource/ToolBarFactory.java
@@ -28,7 +28,7 @@
 
 /**
  * This class represents a tool bar factory which builds
- * tool bars from the content of a resource file.<br>
+ * tool bars from the content of a resource file. <br>
  *
  * The resource entries format is (for a tool bar named 'ToolBar'):<br>
  * <pre>
diff --git a/sources/org/apache/batik/xml/LexicalUnits.java b/sources/org/apache/batik/xml/LexicalUnits.java
index b19a547..38938b2 100644
--- a/sources/org/apache/batik/xml/LexicalUnits.java
+++ b/sources/org/apache/batik/xml/LexicalUnits.java
@@ -36,12 +36,12 @@
     int S = 1;
 
     /**
-     * Represents an XML declaration start lexical unit, ie. '<?xml'.
+     * Represents an XML declaration start lexical unit, i&#x2e;e&#x2e; '&lt;&#x3f;xml'.
      */
     int XML_DECL_START = 2;
 
     /**
-     * Represents a doctype start lexical unit, ie. <!DOCTYPE.
+     * Represents a doctype start lexical unit, i&#x2e;e&#x2e; &lt;&#x21;DOCTYPE.
      */
     int DOCTYPE_START = 3;
 
@@ -51,7 +51,7 @@
     int COMMENT = 4;
 
     /**
-     * Represents a PI start lexical unit, ie. '<?Name'.
+     * Represents a PI start lexical unit, i&#x2e;e&#x2e; '&lt;&#x3f;Name'.
      */
     int PI_START = 5;
 
@@ -61,28 +61,29 @@
     int PI_DATA = 6;
 
     /**
-     * Represents a PI end lexical unit, ie. '?>'.
+     * Represents a PI end lexical unit, i&#x2e;e&#x2e; '&#x3f;&gt;'.
      */
     int PI_END = 7;
 
     /**
-     * Represents a character data lexical unit, ie. the content of an
-     * element.
+     * Represents a character data lexical unit, i&#x2e;e&#x2e; the content of
+     * an element.
      */
     int CHARACTER_DATA = 8;
 
     /**
-     * Represents a start tag lexical unit, ie. '<Name'.
+     * Represents a start tag lexical unit, i&#x2e;e&#x2e; '&lt;Name'.
      */
     int START_TAG = 9;
 
     /**
-     * Represents an end tag lexical unit, ie. '</Name'.
+     * Represents an end tag lexical unit, i&#x2e;e&#x2e; '&lt;/Name'.
      */
     int END_TAG = 10;
 
     /**
-     * Represents a CDATA section start lexical unit, ie. '<![CDATA['.
+     * Represents a CDATA section start lexical unit, i&#x2e;e&#x2e;
+     * '&lt;&#x21;[CDATA['.
      */
     int CDATA_START = 11;
 
@@ -122,17 +123,17 @@
     int LAST_ATTRIBUTE_FRAGMENT = 18;
 
     /**
-     * Represents an empty element end lexical unit, ie. '/>'.
+     * Represents an empty element end lexical unit, i&#x2e;e&#x2e; '/&gt;'.
      */
     int EMPTY_ELEMENT_END = 19;
 
     /**
-     * Represents a end character lexical unit, ie. '>'.
+     * Represents a end character lexical unit, i&#x2e;e&#x2e; '&gt;'.
      */
     int END_CHAR = 20;
 
     /**
-     * Represents a section end lexical unit, ie. ']]>'.
+     * Represents a section end lexical unit, i&#x2e;e&#x2e; ']]&gt;'.
      */
     int SECTION_END = 21;
 
@@ -177,27 +178,31 @@
     int RSQUARE_BRACKET = 29;
 
     /**
-     * Represents a element declaration start lexical unit, ie. '<!ELEMENT'.
+     * Represents a element declaration start lexical unit, i&#x2e;e&#x2e;
+     * '&lt;&#x21;ELEMENT'.
      */
     int ELEMENT_DECLARATION_START = 30;
 
     /**
-     * Represents an ATTLIST declaration start lexical unit, ie. '<!ATTLIST'.
+     * Represents an ATTLIST declaration start lexical unit, i&#x2e;e&#x2e;
+     * '&lt;&#x21;ATTLIST'.
      */
     int ATTLIST_START = 31;
 
     /**
-     * Represents an entity start lexical unit, ie. '<!ENTITY'.
+     * Represents an entity start lexical unit, i&#x2e;e&#x2e; '&lt;&#x21;ENTITY'.
      */
     int ENTITY_START = 32;
 
     /**
-     * Represents a notation start lexical unit, ie. '<!NOTATION'.
+     * Represents a notation start lexical unit, i&#x2e;e&#x2e;
+     * '&lt;&#x21;NOTATION'.
      */
     int NOTATION_START = 33;
 
     /**
-     * Represents a parameter entity reference lexical unit, ie. '%Name;'.
+     * Represents a parameter entity reference lexical unit, i&#x2e;e&#x2e;
+     * '%Name;'.
      */
     int PARAMETER_ENTITY_REFERENCE = 34;
 
@@ -212,7 +217,7 @@
     int ANY_IDENTIFIER = 36;
 
     /**
-     * Represents a '?' lexical unit.
+     * Represents a '&#x3f;' lexical unit.
      */
     int QUESTION = 37;
 
diff --git a/sources/org/apache/batik/xml/XMLScanner.java b/sources/org/apache/batik/xml/XMLScanner.java
index e6c5014..2bddaf1 100644
--- a/sources/org/apache/batik/xml/XMLScanner.java
+++ b/sources/org/apache/batik/xml/XMLScanner.java
@@ -221,7 +221,7 @@
 
     /**
      * Creates a new XML scanner.
-     * @param r The input stream to scan.
+     * @param is The input stream to scan.
      * @param enc The character encoding to use.
      */
     public XMLScanner(InputStream is, String enc) throws XMLException {
@@ -361,7 +361,6 @@
 
         case LexicalUnits.STRING:
         case LexicalUnits.ENTITY_REFERENCE:
-        case LexicalUnits.CHARACTER_REFERENCE:
         case LexicalUnits.PARAMETER_ENTITY_REFERENCE:
         case LexicalUnits.START_TAG:
         case LexicalUnits.FIRST_ATTRIBUTE_FRAGMENT:
@@ -369,6 +368,7 @@
 
         case LexicalUnits.PI_START:
         case LexicalUnits.END_TAG:
+        case LexicalUnits.CHARACTER_REFERENCE:
             return 2;
 
         case LexicalUnits.COMMENT:
@@ -1964,7 +1964,7 @@
 
     /**
      * Reads an entity or character reference. The current character
-     * must be '&'.
+     * must be '&amp;'.
      * @return type.
      */
     protected int readReference() throws IOException, XMLException {
diff --git a/sources/org/w3c/css/sac/CSSException.java b/sources/org/w3c/css/sac/CSSException.java
index 52e08c7..7595cd3 100644
--- a/sources/org/w3c/css/sac/CSSException.java
+++ b/sources/org/w3c/css/sac/CSSException.java
@@ -57,7 +57,7 @@
     
     /**
      * Creates a new CSSException with an embeded exception.
-     * @param a the embeded exception.
+     * @param e the embeded exception.
      */
     public CSSException(Exception e) {
 	this.code = SAC_UNSPECIFIED_ERR;
@@ -66,7 +66,7 @@
 
     /**
      * Creates a new CSSException with a specific code.
-     * @param a the embeded exception.
+     * @param code the embeded exception.
      */
     public CSSException(short code) {
         this.code = code;
diff --git a/sources/org/w3c/css/sac/Condition.java b/sources/org/w3c/css/sac/Condition.java
index d3b9646..e4c8d64 100644
--- a/sources/org/w3c/css/sac/Condition.java
+++ b/sources/org/w3c/css/sac/Condition.java
@@ -81,7 +81,7 @@
     public static final short SAC_LANG_CONDITION		= 6;
     /**
      * This condition checks for a value in a space-separated values in a
-     * specified attribute
+     * specified attribute.
      * example:
      * <pre class="example">
      *   [values~="10"]
diff --git a/sources/org/w3c/css/sac/ConditionFactory.java b/sources/org/w3c/css/sac/ConditionFactory.java
index 24636a1..0f72088 100644
--- a/sources/org/w3c/css/sac/ConditionFactory.java
+++ b/sources/org/w3c/css/sac/ConditionFactory.java
@@ -98,7 +98,7 @@
     /**
      * Creates a lang condition
      *
-     * @param value the value of the language.
+     * @param lang the value of the language.
      * @return A lang condition
      * @exception CSSException if this exception is not supported.
      */    
@@ -142,10 +142,7 @@
     /**
      * Creates a class condition
      *
-     * @param localName the localName of the attribute
      * @param namespaceURI the namespace URI of the attribute
-     * @param specified <code>true</code> if the attribute must be specified
-     *                  in the document.
      * @param value the name of the class.
      * @return A class condition
      * @exception CSSException if this exception is not supported.
diff --git a/sources/org/w3c/css/sac/DocumentHandler.java b/sources/org/w3c/css/sac/DocumentHandler.java
index 59c27bf..1667061 100644
--- a/sources/org/w3c/css/sac/DocumentHandler.java
+++ b/sources/org/w3c/css/sac/DocumentHandler.java
@@ -25,7 +25,7 @@
      * The CSS parser will invoke this method only once, before any other
      * methods in this interface.
      *
-     * @param uri The URI of the style sheet. @@TODO can be NULL ! (inline style sheet)
+     * @param source The source of the style sheet.
      * @exception CSSException Any CSS exception, possibly wrapping another
      *                         exception.  
      */
@@ -40,7 +40,7 @@
      * method until it has either abandoned parsing (because of an
      * unrecoverable error) or reached the end of input.  
      *
-     * @param uri The URI of the style sheet.
+     * @param source The source of the style sheet.
      * @exception CSSException Any CSS exception, possibly wrapping another
      *                         exception.  
      */
@@ -61,7 +61,7 @@
      * Receive notification of an unknown rule t-rule not supported by this
      * parser.
      *
-     * @param at-rule The complete ignored at-rule.
+     * @param atRule The complete ignored at-rule.
      * @exception CSSException Any CSS exception, possibly wrapping another
      *                         exception.  
      */
@@ -84,8 +84,8 @@
      *
      * @param uri The URI of the imported style sheet.
      * @param media The intended destination media for style information.
-     * @param defaultNamepaceURI The default namespace URI for the imported
-     *                           style sheet.
+     * @param defaultNamespaceURI The default namespace URI for the imported
+     *                            style sheet.
      * @exception CSSException Any CSS exception, possibly wrapping another
      *                         exception.
      */
@@ -132,7 +132,7 @@
     /**
      * Receive notification of the end of a media statement.
      *
-     * @param media The intended destination medium for style information.
+     * @param name the name of the page (if any, null otherwise)
      * @param pseudo_page the pseudo page (if any, null otherwise)
      * @exception CSSException Any CSS exception, possibly wrapping another
      *                         exception.  
diff --git a/sources/org/w3c/css/sac/LexicalUnit.java b/sources/org/w3c/css/sac/LexicalUnit.java
index c053c7a..3f3e100 100644
--- a/sources/org/w3c/css/sac/LexicalUnit.java
+++ b/sources/org/w3c/css/sac/LexicalUnit.java
@@ -138,7 +138,7 @@
      */
     public static final short SAC_PERCENTAGE		= 23;
     /**
-     * URI: <code>uri(...)</code>.
+     * URI: <code>uri(&#x2e;&#x2e;&#x2e;)</code>.
      * @see #getStringValue
      */
     public static final short SAC_URI		        = 24;
@@ -215,7 +215,7 @@
      */
     public static final short SAC_STRING_VALUE		= 36;
     /**
-     * Attribute: <code>attr(...)</code>.
+     * Attribute: <code>attr(&#x2e;&#x2e;&#x2e;)</code>.
      * @see #getStringValue
      */
     public static final short SAC_ATTR		        = 37;
diff --git a/sources/org/w3c/css/sac/Parser.java b/sources/org/w3c/css/sac/Parser.java
index ea4514e..856afbb 100644
--- a/sources/org/w3c/css/sac/Parser.java
+++ b/sources/org/w3c/css/sac/Parser.java
@@ -147,7 +147,7 @@
     /**
      * Parse a CSS style declaration (without '{' and '}').
      *
-     * @param styleValue The declaration.
+     * @param source The source of the style sheet.
      * @exception CSSException Any CSS exception, possibly
      *            wrapping another exception.
      * @exception java.io.IOException An IO exception from the parser,
@@ -207,7 +207,7 @@
 
     
     /**
-     * Parse a CSS priority value (e.g. "!important").
+     * Parse a CSS priority value (e&#x2e;g&#x2e; "&#x21;important").
      * 
      * 
      * @exception CSSException Any CSS exception, possibly
diff --git a/sources/org/w3c/css/sac/SelectorFactory.java b/sources/org/w3c/css/sac/SelectorFactory.java
index ab84e4d..4fdf89b 100644
--- a/sources/org/w3c/css/sac/SelectorFactory.java
+++ b/sources/org/w3c/css/sac/SelectorFactory.java
@@ -156,9 +156,9 @@
      *
      * @param nodeType the type of nodes in the siblings list.
      * @param child the child selector
-     * @param adjacent the direct adjacent selector
+     * @param directAdjacent the direct adjacent selector
      * @return the sibling selector with nodeType 
-               equals to org.w3c.dom.Node.ELEMENT_NODE
+     *         equals to org.w3c.dom.Node.ELEMENT_NODE
      * @exception CSSException If this selector is not supported.
      */
     SiblingSelector createDirectAdjacentSelector(short nodeType,
diff --git a/sources/org/w3c/dom/svg/EventListenerInitializer.java b/sources/org/w3c/dom/svg/EventListenerInitializer.java
index dcc88ad..52e9d5a 100755
--- a/sources/org/w3c/dom/svg/EventListenerInitializer.java
+++ b/sources/org/w3c/dom/svg/EventListenerInitializer.java
@@ -1,11 +1,20 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.        *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in  *
- * the LICENSE file.                                                         *
- *****************************************************************************/
+/*
 
+   Copyright 2003 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.
+   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.w3c.dom.svg;
 
 /**
diff --git a/test-references/org/apache/batik/svggen/index.svg b/test-references/org/apache/batik/svggen/index.svg
index 0022a20..f702a4b 100644
--- a/test-references/org/apache/batik/svggen/index.svg
+++ b/test-references/org/apache/batik/svggen/index.svg
@@ -2,19 +2,29 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
-<!-- ========================================================================= -->
-<!-- Copyright (C) The Apache Software Foundation. All rights reserved.        -->
-<!--                                                                           -->
-<!-- This software is published under the terms of the Apache Software License -->
-<!-- version 1.1, a copy of which has been included with this distribution in  -->
-<!-- the LICENSE file.                                                         -->
-<!-- ========================================================================= -->
+<!--
 
-<!-- ========================================================================= -->
-<!--                                                                           -->
+   Copyright 2001,2005  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.
+   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.
+
+-->
+
+<!-- ====================================================================== -->
+<!--                                                                        -->
 <!-- @author vhardy@apache.org                                              -->
-<!-- @version $Id$ -->
-<!-- ========================================================================= -->
+<!-- @version $Id$        -->
+<!-- ====================================================================== -->
 
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500">
 
diff --git a/test-references/org/apache/batik/svggen/indexContext.svg b/test-references/org/apache/batik/svggen/indexContext.svg
index 6ede91b..c16a2e5 100644
--- a/test-references/org/apache/batik/svggen/indexContext.svg
+++ b/test-references/org/apache/batik/svggen/indexContext.svg
@@ -2,19 +2,29 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
-<!-- ========================================================================= -->
-<!-- Copyright (C) The Apache Software Foundation. All rights reserved.        -->
-<!--                                                                           -->
-<!-- This software is published under the terms of the Apache Software License -->
-<!-- version 1.1, a copy of which has been included with this distribution in  -->
-<!-- the LICENSE file.                                                         -->
-<!-- ========================================================================= -->
+<!--
 
-<!-- ========================================================================= -->
-<!--                                                                           -->
+   Copyright 2001,2005  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.
+   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.
+
+-->
+
+<!-- ====================================================================== -->
+<!--                                                                        -->
 <!-- @author vhardy@apache.org                                              -->
-<!-- @version $Id$   -->
-<!-- ========================================================================= -->
+<!-- @version $Id$ -->
+<!-- ====================================================================== -->
 
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500">
 
diff --git a/test-references/samples/tests/spec/scripting/getElementById.png b/test-references/samples/tests/spec/scripting/getElementById.png
new file mode 100644
index 0000000..46235f6
--- /dev/null
+++ b/test-references/samples/tests/spec/scripting/getElementById.png
Binary files differ
diff --git a/test-references/samples/tests/spec/scripting/paintType.png b/test-references/samples/tests/spec/scripting/paintType.png
new file mode 100644
index 0000000..f35218e
--- /dev/null
+++ b/test-references/samples/tests/spec/scripting/paintType.png
Binary files differ
diff --git a/test-references/samples/tests/spec/scripting/pathLength.png b/test-references/samples/tests/spec/scripting/pathLength.png
new file mode 100644
index 0000000..8879e6f
--- /dev/null
+++ b/test-references/samples/tests/spec/scripting/pathLength.png
Binary files differ
diff --git a/test-references/samples/tests/spec/scripting/svgFontMove.png b/test-references/samples/tests/spec/scripting/svgFontMove.png
new file mode 100644
index 0000000..2adcaa2
--- /dev/null
+++ b/test-references/samples/tests/spec/scripting/svgFontMove.png
Binary files differ
diff --git a/test-references/samples/tests/spec/styling/important.png b/test-references/samples/tests/spec/styling/important.png
new file mode 100644
index 0000000..8905a76
--- /dev/null
+++ b/test-references/samples/tests/spec/styling/important.png
Binary files differ
diff --git a/test-resources/org/apache/batik/apps/rasterizer/unitTesting.xml b/test-resources/org/apache/batik/apps/rasterizer/unitTesting.xml
index f7b6cd8..3028710 100644
--- a/test-resources/org/apache/batik/apps/rasterizer/unitTesting.xml
+++ b/test-resources/org/apache/batik/apps/rasterizer/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ====================================================================== -->
diff --git a/test-resources/org/apache/batik/bridge/IWasLoaded.jar b/test-resources/org/apache/batik/bridge/IWasLoaded.jar
index 1fe3004..d907f7e 100644
--- a/test-resources/org/apache/batik/bridge/IWasLoaded.jar
+++ b/test-resources/org/apache/batik/bridge/IWasLoaded.jar
Binary files differ
diff --git a/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar b/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar
index 4e73f01..849aec0 100644
--- a/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar
+++ b/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar
Binary files differ
diff --git a/test-resources/org/apache/batik/bridge/JarCheckPermissionsDenied.jar b/test-resources/org/apache/batik/bridge/JarCheckPermissionsDenied.jar
index 2df6d8b..cae82c6 100644
--- a/test-resources/org/apache/batik/bridge/JarCheckPermissionsDenied.jar
+++ b/test-resources/org/apache/batik/bridge/JarCheckPermissionsDenied.jar
Binary files differ
diff --git a/test-resources/org/apache/batik/bridge/JarCheckPermissionsGranted.jar b/test-resources/org/apache/batik/bridge/JarCheckPermissionsGranted.jar
index b82e8a5..e0c4fb5 100644
--- a/test-resources/org/apache/batik/bridge/JarCheckPermissionsGranted.jar
+++ b/test-resources/org/apache/batik/bridge/JarCheckPermissionsGranted.jar
Binary files differ
diff --git a/test-resources/org/apache/batik/bridge/ecmaCheckConstrain.svg b/test-resources/org/apache/batik/bridge/ecmaCheckConstrain.svg
index 904933c..c42cc15 100644
--- a/test-resources/org/apache/batik/bridge/ecmaCheckConstrain.svg
+++ b/test-resources/org/apache/batik/bridge/ecmaCheckConstrain.svg
@@ -33,6 +33,6 @@
      onload="runTest()">
 
     <test:testResult id="testResult" result="passed"/>
-    <script type="text/ecmascript" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/iWasLoaded.js?content-type=text/plain" />
+    <script type="text/ecmascript" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/iWasLoaded.js?content-type=text/plain" />
 
 </svg>
diff --git a/test-resources/org/apache/batik/bridge/ecmaCheckLoadAny.svg b/test-resources/org/apache/batik/bridge/ecmaCheckLoadAny.svg
index 2943c60..2dd7f10 100755
--- a/test-resources/org/apache/batik/bridge/ecmaCheckLoadAny.svg
+++ b/test-resources/org/apache/batik/bridge/ecmaCheckLoadAny.svg
@@ -33,6 +33,6 @@
      onload="runTest()">
 
     <test:testResult id="testResult" result="failed" errorCode="ecmascript.not.loaded"/>
-    <script type="text/ecmascript" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/iWasLoadedToo.js?content-type=text/plain" />
+    <script type="text/ecmascript" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/iWasLoadedToo.js?content-type=text/plain" />
 
 </svg>
diff --git a/test-resources/org/apache/batik/bridge/ecmaCheckNoConstrain.svg b/test-resources/org/apache/batik/bridge/ecmaCheckNoConstrain.svg
index 853c05f..1d06dcb 100644
--- a/test-resources/org/apache/batik/bridge/ecmaCheckNoConstrain.svg
+++ b/test-resources/org/apache/batik/bridge/ecmaCheckNoConstrain.svg
@@ -33,6 +33,6 @@
      onload="runTest()">
 
     <test:testResult id="testResult" result="failed" errorCode="ecmascript.not.loaded"/>
-    <script type="text/ecmascript" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/iWasLoadedToo.js?content-type=text/plain" />
+    <script type="text/ecmascript" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/iWasLoadedToo.js?content-type=text/plain" />
 
 </svg>
diff --git a/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadAny.svg b/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadAny.svg
index 64e76bf..334f20e 100755
--- a/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadAny.svg
+++ b/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadAny.svg
@@ -33,6 +33,6 @@
      width="450" height="500" viewBox="0 0 450 500">
 
     <test:testResult id="testResult" result="passed"/>
-    <script type="text/ecmascript" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/iWasLoaded.js?content-type=text/plain" />
+    <script type="text/ecmascript" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/iWasLoaded.js?content-type=text/plain" />
 
 </svg>
diff --git a/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadEmbed.svg b/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadEmbed.svg
index 8c88abb..6081283 100755
--- a/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadEmbed.svg
+++ b/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadEmbed.svg
@@ -34,8 +34,7 @@
     <test:testResult id="testResult" result="passed"/>
     <script type="text/ecmascript" ><![CDATA[
         var result = document.getElementById("testResult");
-        result.setAttributeNS(null, "result", "failed");
-        result.setAttributeNS(null, "errorCode", "embeded script should not have been loaded");
+        result.setAttributeNS(null, "result", "ran");
     ]]></script>
 
 </svg>
diff --git a/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadEmbedAttr.svg b/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadEmbedAttr.svg
index cea4417..f951c4e 100755
--- a/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadEmbedAttr.svg
+++ b/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadEmbedAttr.svg
@@ -30,7 +30,8 @@
      xmlns:xlink="http://www.w3.org/1999/xlink" 
      xmlns:test="http://xml.apache.org/batik/test"
      width="450" height="500" viewBox="0 0 450 500"
-     onload="var result = document.getElementById('testResult'); result.setAttributeNS(null, 'result', 'failed');result.setAttributeNS(null, 'errorCode', 'embeded script should not have been loaded');">
+     onload="var result = document.getElementById('testResult'); 
+             result.setAttributeNS(null, 'result', 'ran');">
 
     <test:testResult id="testResult" result="passed"/>
 
diff --git a/test-resources/org/apache/batik/bridge/error/xml-invalid.svg b/test-resources/org/apache/batik/bridge/error/xml-invalid.svg
index 80d3471..3c98c3e 100644
--- a/test-resources/org/apache/batik/bridge/error/xml-invalid.svg
+++ b/test-resources/org/apache/batik/bridge/error/xml-invalid.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/test-resources/org/apache/batik/bridge/iWasLoaded.js b/test-resources/org/apache/batik/bridge/iWasLoaded.js
index d61b5c0..b79a4b2 100644
--- a/test-resources/org/apache/batik/bridge/iWasLoaded.js
+++ b/test-resources/org/apache/batik/bridge/iWasLoaded.js
@@ -1,10 +1,20 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.        *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in  *
- * the LICENSE file.                                                         *
- *****************************************************************************/
+/*
+
+   Copyright 2002 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.
+   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.
+
+ */
     
 /**
  * If this script is loaded by ecmaCheckNoLoad.svg, it will mark
diff --git a/test-resources/org/apache/batik/bridge/iWasLoadedToo.js b/test-resources/org/apache/batik/bridge/iWasLoadedToo.js
index e9c4347..9d1f271 100644
--- a/test-resources/org/apache/batik/bridge/iWasLoadedToo.js
+++ b/test-resources/org/apache/batik/bridge/iWasLoadedToo.js
@@ -1,10 +1,20 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.        *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in  *
- * the LICENSE file.                                                         *
- *****************************************************************************/
+/*
+
+   Copyright 2002 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.
+   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.
+
+ */
     
 /**
  * If this script is loaded by ecmaCheckLoad.svg, it will mark
diff --git a/test-resources/org/apache/batik/bridge/jarCheckConstrain.svg b/test-resources/org/apache/batik/bridge/jarCheckConstrain.svg
index 306470e..ac04450 100644
--- a/test-resources/org/apache/batik/bridge/jarCheckConstrain.svg
+++ b/test-resources/org/apache/batik/bridge/jarCheckConstrain.svg
@@ -31,6 +31,6 @@
      width="450" height="500" viewBox="0 0 450 500">
 
     <test:testResult id="testResult" result="passed" />
-    <script type="application/java-archive" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/IWasLoaded.jar" />
+    <script type="application/java-archive" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/IWasLoaded.jar" />
 
 </svg>
diff --git a/test-resources/org/apache/batik/bridge/jarCheckLoadAny.svg b/test-resources/org/apache/batik/bridge/jarCheckLoadAny.svg
index 8858cd0..08194f0 100755
--- a/test-resources/org/apache/batik/bridge/jarCheckLoadAny.svg
+++ b/test-resources/org/apache/batik/bridge/jarCheckLoadAny.svg
@@ -31,6 +31,6 @@
      width="450" height="500" viewBox="0 0 450 500">
 
     <test:testResult id="testResult" result="failed" errorCode="IWasLoadedToo.jar should have been loaded"/>
-    <script type="application/java-archive" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar" />
+    <script type="application/java-archive" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar" />
 
 </svg>
diff --git a/test-resources/org/apache/batik/bridge/jarCheckNoConstrain.svg b/test-resources/org/apache/batik/bridge/jarCheckNoConstrain.svg
index 8e5d328..4767632 100644
--- a/test-resources/org/apache/batik/bridge/jarCheckNoConstrain.svg
+++ b/test-resources/org/apache/batik/bridge/jarCheckNoConstrain.svg
@@ -31,6 +31,6 @@
      width="450" height="500" viewBox="0 0 450 500">
 
     <test:testResult id="testResult" result="failed" errorCode="IWasLoadedToo.jar should have been loaded"/>
-    <script type="application/java-archive" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar" />
+    <script type="application/java-archive" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar" />
 
 </svg>
diff --git a/test-resources/org/apache/batik/bridge/jarCheckNoLoadAny.svg b/test-resources/org/apache/batik/bridge/jarCheckNoLoadAny.svg
index dca8ac3..e0895d9 100755
--- a/test-resources/org/apache/batik/bridge/jarCheckNoLoadAny.svg
+++ b/test-resources/org/apache/batik/bridge/jarCheckNoLoadAny.svg
@@ -31,6 +31,6 @@
      width="450" height="500" viewBox="0 0 450 500">
 
     <test:testResult id="testResult" result="passed" />
-    <script type="application/java-archive" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/IWasLoaded.jar" />
+    <script type="application/java-archive" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/IWasLoaded.jar" />
 
 </svg>
diff --git a/test-resources/org/apache/batik/bridge/unitTesting.xml b/test-resources/org/apache/batik/bridge/unitTesting.xml
index 52773eb..e325be6 100644
--- a/test-resources/org/apache/batik/bridge/unitTesting.xml
+++ b/test-resources/org/apache/batik/bridge/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/test-resources/org/apache/batik/css/dom/unitTesting.xml b/test-resources/org/apache/batik/css/dom/unitTesting.xml
index c776622..91dfd41 100644
--- a/test-resources/org/apache/batik/css/dom/unitTesting.xml
+++ b/test-resources/org/apache/batik/css/dom/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/test-resources/org/apache/batik/css/engine/value/unitTesting.xml b/test-resources/org/apache/batik/css/engine/value/unitTesting.xml
index 2843989..55904d9 100644
--- a/test-resources/org/apache/batik/css/engine/value/unitTesting.xml
+++ b/test-resources/org/apache/batik/css/engine/value/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ====================================================================== -->
diff --git a/test-resources/org/apache/batik/dom/svg/unitTesting.xml b/test-resources/org/apache/batik/dom/svg/unitTesting.xml
index aa1276a..f1b39fc 100644
--- a/test-resources/org/apache/batik/dom/svg/unitTesting.xml
+++ b/test-resources/org/apache/batik/dom/svg/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/test-resources/org/apache/batik/dom/unitTesting.xml b/test-resources/org/apache/batik/dom/unitTesting.xml
index efb1dc4..828164c 100644
--- a/test-resources/org/apache/batik/dom/unitTesting.xml
+++ b/test-resources/org/apache/batik/dom/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
@@ -204,5 +170,4 @@
     <test id="DOM3.Text.wholeText" class="org.apache.batik.dom.TextWholeTextTest"/>
     <test id="DOM3.Text.replaceWholeText" class="org.apache.batik.dom.TextReplaceWholeTextTest"/>
     <test id="DOM3.EventTarget.addEventListenerNS" class="org.apache.batik.dom.EventTargetAddEventListenerNSTest"/>
-    <test id="DOM3.XPathEvaluator.evaluate" class="org.apache.batik.dom.XPathTest"/>
 </testSuite>
diff --git a/test-resources/org/apache/batik/ext/awt/geom/resources/TestMessages.properties b/test-resources/org/apache/batik/ext/awt/geom/resources/TestMessages.properties
index 18e6f69..cf6e96a 100644
--- a/test-resources/org/apache/batik/ext/awt/geom/resources/TestMessages.properties
+++ b/test-resources/org/apache/batik/ext/awt/geom/resources/TestMessages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # Error Message values for Text Selection Tests
diff --git a/test-resources/org/apache/batik/ext/awt/geom/unitTesting.xml b/test-resources/org/apache/batik/ext/awt/geom/unitTesting.xml
index e8e38dc..c4ea5d5 100644
--- a/test-resources/org/apache/batik/ext/awt/geom/unitTesting.xml
+++ b/test-resources/org/apache/batik/ext/awt/geom/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ====================================================================== -->
diff --git a/test-resources/org/apache/batik/ext/awt/image/codec/resources/Messages.properties b/test-resources/org/apache/batik/ext/awt/image/codec/resources/Messages.properties
index 8450047..d52825b 100644
--- a/test-resources/org/apache/batik/ext/awt/image/codec/resources/Messages.properties
+++ b/test-resources/org/apache/batik/ext/awt/image/codec/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # Error Message values for org.apache.batik.ext.awt.image.codec Tests
diff --git a/test-resources/org/apache/batik/ext/awt/image/codec/unitTesting.xml b/test-resources/org/apache/batik/ext/awt/image/codec/unitTesting.xml
index a75c8f6..dd17181 100644
--- a/test-resources/org/apache/batik/ext/awt/image/codec/unitTesting.xml
+++ b/test-resources/org/apache/batik/ext/awt/image/codec/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/test-resources/org/apache/batik/gvt/resources/TestMessages.properties b/test-resources/org/apache/batik/gvt/resources/TestMessages.properties
index ad5430f..18993c4 100644
--- a/test-resources/org/apache/batik/gvt/resources/TestMessages.properties
+++ b/test-resources/org/apache/batik/gvt/resources/TestMessages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # Error Message values for Text Selection Tests
diff --git a/test-resources/org/apache/batik/gvt/unitTesting.xml b/test-resources/org/apache/batik/gvt/unitTesting.xml
index a2cf0ac..5096f20 100644
--- a/test-resources/org/apache/batik/gvt/unitTesting.xml
+++ b/test-resources/org/apache/batik/gvt/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ====================================================================== -->
diff --git a/test-resources/org/apache/batik/parser/unitTesting.xml b/test-resources/org/apache/batik/parser/unitTesting.xml
index 0b5632a..3782509 100644
--- a/test-resources/org/apache/batik/parser/unitTesting.xml
+++ b/test-resources/org/apache/batik/parser/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/test-resources/org/apache/batik/script/rhino/unitTesting.xml b/test-resources/org/apache/batik/script/rhino/unitTesting.xml
index 8615c72..4e02ef6 100644
--- a/test-resources/org/apache/batik/script/rhino/unitTesting.xml
+++ b/test-resources/org/apache/batik/script/rhino/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/test-resources/org/apache/batik/svggen/regsvggen.xml b/test-resources/org/apache/batik/svggen/regsvggen.xml
index ef36784..880e557 100644
--- a/test-resources/org/apache/batik/svggen/regsvggen.xml
+++ b/test-resources/org/apache/batik/svggen/regsvggen.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/test-resources/org/apache/batik/svggen/resources/Messages.properties b/test-resources/org/apache/batik/svggen/resources/Messages.properties
index 4a78685..1445b7b 100644
--- a/test-resources/org/apache/batik/svggen/resources/Messages.properties
+++ b/test-resources/org/apache/batik/svggen/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # Error Messages values
diff --git a/test-resources/org/apache/batik/swing/resources/TestMessages.properties b/test-resources/org/apache/batik/swing/resources/TestMessages.properties
index a594dd8..3f29511 100644
--- a/test-resources/org/apache/batik/swing/resources/TestMessages.properties
+++ b/test-resources/org/apache/batik/swing/resources/TestMessages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # Keys in the generated TestReport Entries
diff --git a/test-resources/org/apache/batik/swing/unitTesting.xml b/test-resources/org/apache/batik/swing/unitTesting.xml
index 19f3282..44de6a1 100644
--- a/test-resources/org/apache/batik/swing/unitTesting.xml
+++ b/test-resources/org/apache/batik/swing/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ====================================================================== -->
@@ -60,11 +26,11 @@
     <test id="samples/tests/spec/scripting/memoryLeak1.svg"/>
   </testGroup>
 
-  <test id="NullURITest" 
+  <!--test id="NullURITest" 
         class="org.apache.batik.swing.NullURITest" />
 
   <test id="NullSetSVGDocumentTest" 
-        class="org.apache.batik.swing.NullSetSVGDocumentTest" />
+        class="org.apache.batik.swing.NullSetSVGDocumentTest" /-->
 
   <test id="SetSVGDocumentTest" 
         class="org.apache.batik.swing.SetSVGDocumentTest" />
diff --git a/test-resources/org/apache/batik/test/interactiveSamples.xml b/test-resources/org/apache/batik/test/interactiveSamples.xml
index 38edb07..8c6729e 100755
--- a/test-resources/org/apache/batik/test/interactiveSamples.xml
+++ b/test-resources/org/apache/batik/test/interactiveSamples.xml
@@ -37,6 +37,7 @@
 
     <testGroup id="tests.spec.scripting" name="Interactive Scripting Tests"
                class="org.apache.batik.test.svg.JSVGRenderingAccuracyTest">
+        <test id="samples/tests/spec/scripting/addDescOnClick.svg" />
         <test id="samples/tests/spec/scripting/bug12933.svg" />
         <test id="samples/tests/spec/scripting/filterPatternUpdate.svg" />
         <test id="samples/tests/spec/scripting/gradientsUpdate.svg" />
diff --git a/test-resources/org/apache/batik/test/resources/Messages.properties b/test-resources/org/apache/batik/test/resources/Messages.properties
index 4ac60d3..2c770be 100644
--- a/test-resources/org/apache/batik/test/resources/Messages.properties
+++ b/test-resources/org/apache/batik/test/resources/Messages.properties
@@ -1,48 +1,19 @@
 ###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
 #
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+#   Copyright 2004  The Apache Software Foundation 
 #
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
+#   Licensed 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
 #
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
+#       http://www.apache.org/licenses/LICENSE-2.0
 #
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
+#   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.
 #
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
 ###############################################################################
 
 #
diff --git a/test-resources/org/apache/batik/test/samplesRendering.xml b/test-resources/org/apache/batik/test/samplesRendering.xml
index 5f9e390..594472c 100644
--- a/test-resources/org/apache/batik/test/samplesRendering.xml
+++ b/test-resources/org/apache/batik/test/samplesRendering.xml
@@ -298,6 +298,7 @@
          <test id="samples/tests/spec/styling/cssMediaList.svg" />
          <test id="samples/tests/spec/styling/emptyStyle.svg" />
          <test id="samples/tests/spec/styling/fontShorthand.svg" />
+         <test id="samples/tests/spec/styling/important.svg" />
          <test id="samples/tests/spec/styling/smiley.svg" />
          <test id="samples/tests/spec/styling/styleElement.svg" />
 
@@ -364,6 +365,7 @@
         <test id="samples/tests/spec/scripting/enclosureList.svg" />
         <test id="samples/tests/spec/scripting/enclosureList2.svg" />
         <test id="samples/tests/spec/scripting/fill.svg" />
+        <test id="samples/tests/spec/scripting/getElementById.svg" />
         <test id="samples/tests/spec/scripting/image.svg" />
         <test id="samples/tests/spec/scripting/imageRefUpdate.svg" />
         <test id="samples/tests/spec/scripting/imageraster.svg" />
@@ -372,7 +374,9 @@
         <test id="samples/tests/spec/scripting/intersectionList2.svg" />
         <test id="samples/tests/spec/scripting/line.svg" />
         <test id="samples/tests/spec/scripting/nestedsvg.svg" />
+        <test id="samples/tests/spec/scripting/paintType.svg" />
         <test id="samples/tests/spec/scripting/path.svg" />
+        <test id="samples/tests/spec/scripting/pathLength.svg" />
         <test id="samples/tests/spec/scripting/path_pathSegList_create.svg" />
         <test id="samples/tests/spec/scripting/path_pathSegList1.svg" />
         <test id="samples/tests/spec/scripting/path_pathSegList2.svg" />
@@ -428,6 +432,7 @@
         <test id="samples/tests/spec/scripting/rectResizeOnClick.svg" />
         <test id="samples/tests/spec/scripting/setProperty.svg" />
         <test id="samples/tests/spec/scripting/styling.svg" />
+        <test id="samples/tests/spec/scripting/svgFontMove.svg" />
         <test id="samples/tests/spec/scripting/text_content.svg" />
         <test id="samples/tests/spec/scripting/textProperties2.svg" />
         <test id="samples/tests/spec/scripting/visibilityOnClick.svg" />
diff --git a/test-resources/org/apache/batik/test/svg/resources/Messages.properties b/test-resources/org/apache/batik/test/svg/resources/Messages.properties
index 7215607..7b15d3d 100644
--- a/test-resources/org/apache/batik/test/svg/resources/Messages.properties
+++ b/test-resources/org/apache/batik/test/svg/resources/Messages.properties
@@ -1,48 +1,19 @@
 ###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
 #
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+#   Copyright 2004  The Apache Software Foundation 
 #
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
+#   Licensed 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
 #
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
+#       http://www.apache.org/licenses/LICENSE-2.0
 #
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
+#   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.
 #
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
 ###############################################################################
 
 #
diff --git a/test-resources/org/apache/batik/test/svg/unexpectedResultValue.svg b/test-resources/org/apache/batik/test/svg/unexpectedResultValue.svg
index c19e2fd..6ad3f6e 100644
--- a/test-resources/org/apache/batik/test/svg/unexpectedResultValue.svg
+++ b/test-resources/org/apache/batik/test/svg/unexpectedResultValue.svg
@@ -3,53 +3,19 @@
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/test-resources/org/apache/batik/test/unitTesting.xml b/test-resources/org/apache/batik/test/unitTesting.xml
index d5978a7..ae83e0c 100644
--- a/test-resources/org/apache/batik/test/unitTesting.xml
+++ b/test-resources/org/apache/batik/test/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ===================================================================== -->
diff --git a/test-resources/org/apache/batik/test/xml/resources/Messages.properties b/test-resources/org/apache/batik/test/xml/resources/Messages.properties
index c52056d..2bc965d 100644
--- a/test-resources/org/apache/batik/test/xml/resources/Messages.properties
+++ b/test-resources/org/apache/batik/test/xml/resources/Messages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # XMLTestReportProcessor configuration
diff --git a/test-resources/org/apache/batik/test/xml/testSuiteB.xml b/test-resources/org/apache/batik/test/xml/testSuiteB.xml
index b9114c3..438fed1 100644
--- a/test-resources/org/apache/batik/test/xml/testSuiteB.xml
+++ b/test-resources/org/apache/batik/test/xml/testSuiteB.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ========================================================================= -->
diff --git a/test-resources/org/apache/batik/transcoder/image/resources/px2mm.svg b/test-resources/org/apache/batik/transcoder/image/resources/px2mm.svg
index 199af49..e2d5659 100644
--- a/test-resources/org/apache/batik/transcoder/image/resources/px2mm.svg
+++ b/test-resources/org/apache/batik/transcoder/image/resources/px2mm.svg
@@ -2,53 +2,19 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="450" height="500">
diff --git a/test-resources/org/apache/batik/transcoder/image/unitTesting.xml b/test-resources/org/apache/batik/transcoder/image/unitTesting.xml
index 2527fd6..57cf12e 100644
--- a/test-resources/org/apache/batik/transcoder/image/unitTesting.xml
+++ b/test-resources/org/apache/batik/transcoder/image/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ====================================================================== -->
diff --git a/test-resources/org/apache/batik/transcoder/unitTesting.xml b/test-resources/org/apache/batik/transcoder/unitTesting.xml
index 5d8989f..b3de262 100755
--- a/test-resources/org/apache/batik/transcoder/unitTesting.xml
+++ b/test-resources/org/apache/batik/transcoder/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ====================================================================== -->
diff --git a/test-resources/org/apache/batik/util/resources/TestMessages.properties b/test-resources/org/apache/batik/util/resources/TestMessages.properties
index ee23218..62efa62 100644
--- a/test-resources/org/apache/batik/util/resources/TestMessages.properties
+++ b/test-resources/org/apache/batik/util/resources/TestMessages.properties
@@ -1,49 +1,18 @@
-###############################################################################
-#                   The Apache Software License, Version 1.1                  #
-###############################################################################
-#
-# Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modifica-
-# tion, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of  source code must  retain the above copyright  notice,
-#    this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. The end-user documentation included with the redistribution, if any, must
-#    include  the following  acknowledgment:  "This product includes  software
-#    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-#    Alternately, this  acknowledgment may  appear in the software itself,  if
-#    and wherever such third-party acknowledgments normally appear.
-#
-# 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-#    used to  endorse or promote  products derived from  this software without
-#    prior written permission. For written permission, please contact
-#    apache@apache.org.
-#
-# 5. Products  derived from this software may not  be called "Apache", nor may
-#    "Apache" appear  in their name,  without prior written permission  of the
-#    Apache Software Foundation.
-#
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
-# APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
-# DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
-# ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
-# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This software  consists of voluntary contributions made  by many individuals
-# on  behalf of the Apache Software  Foundation. For more  information on the
-# Apache Software Foundation, please see <http://www.apache.org/>.
-###############################################################################
+###########################################################################
+# Copyright 1999-2003,2005 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.
+# 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.
+###########################################################################
 
 #
 # Error Message values for ParsedURL Tests
diff --git a/test-resources/org/apache/batik/util/unitTesting.xml b/test-resources/org/apache/batik/util/unitTesting.xml
index c9a57f9..fcd314e 100644
--- a/test-resources/org/apache/batik/util/unitTesting.xml
+++ b/test-resources/org/apache/batik/util/unitTesting.xml
@@ -1,51 +1,17 @@
 <!--
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
+   Copyright 1999-2003,2005 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.
+   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.
 -->
 
 <!-- ====================================================================== -->
diff --git a/test-sources/org/apache/batik/apps/rasterizer/MainTest.java b/test-sources/org/apache/batik/apps/rasterizer/MainTest.java
index 9b38e81..3d1b7ab 100644
--- a/test-sources/org/apache/batik/apps/rasterizer/MainTest.java
+++ b/test-sources/org/apache/batik/apps/rasterizer/MainTest.java
@@ -32,7 +32,7 @@
 /**
  * Validates the operation of the <tt>Main</tt> class.
  *
- * @author <a href="vhardy@apache.org">Vincent Hardy</a>
+ * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
  * @version $Id$
  */
 public class MainTest extends DefaultTestSuite {
diff --git a/test-sources/org/apache/batik/apps/rasterizer/SVGConverterTest.java b/test-sources/org/apache/batik/apps/rasterizer/SVGConverterTest.java
index 49d1990..a14bfd6 100644
--- a/test-sources/org/apache/batik/apps/rasterizer/SVGConverterTest.java
+++ b/test-sources/org/apache/batik/apps/rasterizer/SVGConverterTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.apps.rasterizer;
 
diff --git a/test-sources/org/apache/batik/bridge/EcmaNoLoadTest.java b/test-sources/org/apache/batik/bridge/EcmaNoLoadTest.java
index d4421ca..25fdd35 100755
--- a/test-sources/org/apache/batik/bridge/EcmaNoLoadTest.java
+++ b/test-sources/org/apache/batik/bridge/EcmaNoLoadTest.java
@@ -51,6 +51,7 @@
                                                          scriptSource[i],
                                                          scriptOrigin[k],
                                                          secure[j],
+                                                         false,
                                                          false);
                     addTest(t);
                 }
@@ -65,11 +66,13 @@
         scripts = "text/ecmascript";
         for (int i=0; i<scriptSource.length; i++) {
             for (int k=0; k<scriptOrigin.length; k++) {
+                boolean expectSuccess = ((i>=2) && (k <= 2));
                 SVGOnLoadExceptionTest t = buildTest(scripts,
                                                      scriptSource[i],
                                                      scriptOrigin[k],
                                                      true,
-                                                     true);
+                                                     true,
+                                                     expectSuccess);
                 addTest(t);
             }
         }
@@ -90,6 +93,7 @@
                     SVGOnLoadExceptionTest t= buildTest(scripts, scriptSource[i],
                                                         scriptOrigin[j],
                                                         secure[k],
+                                                        false,
                                                         false);
                     addTest(t);
                 }
@@ -97,7 +101,9 @@
         }
     }
 
-    SVGOnLoadExceptionTest buildTest(String scripts, String id, String origin, boolean secure, boolean restricted) {
+    SVGOnLoadExceptionTest buildTest(String scripts, String id, String origin, 
+                                     boolean secure, boolean restricted, 
+                                     boolean successExpected) {
         SVGOnLoadExceptionTest t = new SVGOnLoadExceptionTest();
         String desc = 
             "(scripts=" + scripts + 
@@ -109,7 +115,10 @@
         t.setScriptOrigin(origin);
         t.setSecure(secure);
         t.setScripts(scripts);
-        t.setExpectedExceptionClass("java.lang.SecurityException");
+        if (successExpected)
+            t.setExpectedExceptionClass(null);
+        else
+            t.setExpectedExceptionClass("java.lang.SecurityException");
         t.setRestricted(restricted);
 
         return t;
diff --git a/test-sources/org/apache/batik/bridge/ScriptSelfTest.java b/test-sources/org/apache/batik/bridge/ScriptSelfTest.java
index bd84b9c..ee9f3d4 100644
--- a/test-sources/org/apache/batik/bridge/ScriptSelfTest.java
+++ b/test-sources/org/apache/batik/bridge/ScriptSelfTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.bridge;
 
diff --git a/test-sources/org/apache/batik/css/dom/EcmaScriptCSSDOMTest.java b/test-sources/org/apache/batik/css/dom/EcmaScriptCSSDOMTest.java
index 49a9719..224aae8 100644
--- a/test-sources/org/apache/batik/css/dom/EcmaScriptCSSDOMTest.java
+++ b/test-sources/org/apache/batik/css/dom/EcmaScriptCSSDOMTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.css.dom;
 
diff --git a/test-sources/org/apache/batik/css/engine/value/PropertyManagerTest.java b/test-sources/org/apache/batik/css/engine/value/PropertyManagerTest.java
index 930fe56..aca1faa 100644
--- a/test-sources/org/apache/batik/css/engine/value/PropertyManagerTest.java
+++ b/test-sources/org/apache/batik/css/engine/value/PropertyManagerTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.css.engine.value;
 
diff --git a/test-sources/org/apache/batik/dom/SetAttributeTest.java b/test-sources/org/apache/batik/dom/SetAttributeTest.java
index 77c6afe..86e05d5 100644
--- a/test-sources/org/apache/batik/dom/SetAttributeTest.java
+++ b/test-sources/org/apache/batik/dom/SetAttributeTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.dom;
 
diff --git a/test-sources/org/apache/batik/dom/svg/SystemIdTest.java b/test-sources/org/apache/batik/dom/svg/SystemIdTest.java
index dc76c03..e4f7370 100644
--- a/test-sources/org/apache/batik/dom/svg/SystemIdTest.java
+++ b/test-sources/org/apache/batik/dom/svg/SystemIdTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.dom.svg;
 
diff --git a/test-sources/org/apache/batik/ext/awt/geom/RectListManagerTest.java b/test-sources/org/apache/batik/ext/awt/geom/RectListManagerTest.java
index a06d642..0544b8a 100644
--- a/test-sources/org/apache/batik/ext/awt/geom/RectListManagerTest.java
+++ b/test-sources/org/apache/batik/ext/awt/geom/RectListManagerTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.ext.awt.geom;
 
diff --git a/test-sources/org/apache/batik/ext/awt/image/codec/PNGEncoderTest.java b/test-sources/org/apache/batik/ext/awt/image/codec/PNGEncoderTest.java
index d88e135..0b49163 100644
--- a/test-sources/org/apache/batik/ext/awt/image/codec/PNGEncoderTest.java
+++ b/test-sources/org/apache/batik/ext/awt/image/codec/PNGEncoderTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.ext.awt.image.codec;
 
diff --git a/test-sources/org/apache/batik/gvt/TextSelectionTest.java b/test-sources/org/apache/batik/gvt/TextSelectionTest.java
index 070f262..5f524d1 100644
--- a/test-sources/org/apache/batik/gvt/TextSelectionTest.java
+++ b/test-sources/org/apache/batik/gvt/TextSelectionTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.gvt;
 
diff --git a/test-sources/org/apache/batik/parser/TransformListParserTest.java b/test-sources/org/apache/batik/parser/TransformListParserTest.java
index 0faa93c..d014d57 100644
--- a/test-sources/org/apache/batik/parser/TransformListParserTest.java
+++ b/test-sources/org/apache/batik/parser/TransformListParserTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.parser;
 
diff --git a/test-sources/org/apache/batik/script/rhino/ScriptSelfTest.java b/test-sources/org/apache/batik/script/rhino/ScriptSelfTest.java
index 5acefd2..50935d6 100644
--- a/test-sources/org/apache/batik/script/rhino/ScriptSelfTest.java
+++ b/test-sources/org/apache/batik/script/rhino/ScriptSelfTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.script.rhino;
 
diff --git a/test-sources/org/apache/batik/svggen/Painter.java b/test-sources/org/apache/batik/svggen/Painter.java
index e4fba52..36dc03b 100644
--- a/test-sources/org/apache/batik/svggen/Painter.java
+++ b/test-sources/org/apache/batik/svggen/Painter.java
@@ -24,7 +24,7 @@
  * rendering sequence. This is used to generate SVG content and
  * compare it to a reference.
  *
- * @author <a href="vhardy@eng.sun.com">Vincent Hardy</a>
+ * @author <a href="mailto:vhardy@eng.sun.com">Vincent Hardy</a>
  * @version $Id$
  */
 public interface Painter {
diff --git a/test-sources/org/apache/batik/svggen/TransformCollapse.java b/test-sources/org/apache/batik/svggen/TransformCollapse.java
index 9108cba..588826e 100644
--- a/test-sources/org/apache/batik/svggen/TransformCollapse.java
+++ b/test-sources/org/apache/batik/svggen/TransformCollapse.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.svggen;
 
diff --git a/test-sources/org/apache/batik/swing/JSVGCanvasHandler.java b/test-sources/org/apache/batik/swing/JSVGCanvasHandler.java
index 3fad050..8af8cbd 100644
--- a/test-sources/org/apache/batik/swing/JSVGCanvasHandler.java
+++ b/test-sources/org/apache/batik/swing/JSVGCanvasHandler.java
@@ -49,7 +49,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class JSVGCanvasHandler {
@@ -159,11 +159,15 @@
                                 updateManager.addUpdateManagerListener(url);
                             }});
                 } catch (Throwable t) { t.printStackTrace(); }
+
                 if ( abort) return;
 
                 if (updateManager == null)
                     return;
 
+                // Wait for Update Manager to Start.
+                while (!updateManager.isRunning());
+
                 bindHost();
 
                 if ( abort) return;
@@ -309,6 +313,7 @@
                 }
             });
     }
+
     class UpdateRenderListener implements UpdateManagerListener {
         public void updateCompleted(UpdateManagerEvent e) {
             synchronized(renderMonitor){
diff --git a/test-sources/org/apache/batik/swing/JSVGInterruptTest.java b/test-sources/org/apache/batik/swing/JSVGInterruptTest.java
index 09ea2a4..dd7db45 100644
--- a/test-sources/org/apache/batik/swing/JSVGInterruptTest.java
+++ b/test-sources/org/apache/batik/swing/JSVGInterruptTest.java
@@ -39,7 +39,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class JSVGInterruptTest extends JSVGMemoryLeakTest {
diff --git a/test-sources/org/apache/batik/swing/JSVGMemoryLeakTest.java b/test-sources/org/apache/batik/swing/JSVGMemoryLeakTest.java
index beca4af..8a27553 100644
--- a/test-sources/org/apache/batik/swing/JSVGMemoryLeakTest.java
+++ b/test-sources/org/apache/batik/swing/JSVGMemoryLeakTest.java
@@ -39,7 +39,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class JSVGMemoryLeakTest extends MemoryLeakTest
diff --git a/test-sources/org/apache/batik/swing/NullSetSVGDocumentTest.java b/test-sources/org/apache/batik/swing/NullSetSVGDocumentTest.java
index 22f301c..e3bd0dd 100644
--- a/test-sources/org/apache/batik/swing/NullSetSVGDocumentTest.java
+++ b/test-sources/org/apache/batik/swing/NullSetSVGDocumentTest.java
@@ -33,7 +33,7 @@
  * ensures that when this is passed to JSVGComponet.setDocument it is
  * properly imported to an SVGOMDocument and rendered from there.
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class NullSetSVGDocumentTest extends JSVGMemoryLeakTest {
diff --git a/test-sources/org/apache/batik/swing/SetSVGDocumentTest.java b/test-sources/org/apache/batik/swing/SetSVGDocumentTest.java
index 060be95..72ffe39 100644
--- a/test-sources/org/apache/batik/swing/SetSVGDocumentTest.java
+++ b/test-sources/org/apache/batik/swing/SetSVGDocumentTest.java
@@ -32,7 +32,7 @@
  * ensures that when this is passed to JSVGComponet.setDocument it is
  * properly imported to an SVGOMDocument and rendered from there.
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class SetSVGDocumentTest extends JSVGRenderingAccuracyTest {
diff --git a/test-sources/org/apache/batik/swing/TestMessages.java b/test-sources/org/apache/batik/swing/TestMessages.java
index 2e969d3..8ac577f 100644
--- a/test-sources/org/apache/batik/swing/TestMessages.java
+++ b/test-sources/org/apache/batik/swing/TestMessages.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.swing;
 
diff --git a/test-sources/org/apache/batik/test/MemoryLeakTest.java b/test-sources/org/apache/batik/test/MemoryLeakTest.java
index 466a3a7..6356896 100644
--- a/test-sources/org/apache/batik/test/MemoryLeakTest.java
+++ b/test-sources/org/apache/batik/test/MemoryLeakTest.java
@@ -34,7 +34,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public abstract class MemoryLeakTest  extends AbstractTest {
diff --git a/test-sources/org/apache/batik/test/MemoryLeakTestValidator.java b/test-sources/org/apache/batik/test/MemoryLeakTestValidator.java
index 30146df..43e131b 100644
--- a/test-sources/org/apache/batik/test/MemoryLeakTestValidator.java
+++ b/test-sources/org/apache/batik/test/MemoryLeakTestValidator.java
@@ -24,7 +24,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class MemoryLeakTestValidator extends MemoryLeakTest {
diff --git a/test-sources/org/apache/batik/test/TestSuiteReport.java b/test-sources/org/apache/batik/test/TestSuiteReport.java
index ad3a8be..25cc22d 100644
--- a/test-sources/org/apache/batik/test/TestSuiteReport.java
+++ b/test-sources/org/apache/batik/test/TestSuiteReport.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.test;
 
diff --git a/test-sources/org/apache/batik/test/svg/BERenderingTest.java b/test-sources/org/apache/batik/test/svg/BERenderingTest.java
index de72c72..0499038 100644
--- a/test-sources/org/apache/batik/test/svg/BERenderingTest.java
+++ b/test-sources/org/apache/batik/test/svg/BERenderingTest.java
@@ -21,7 +21,7 @@
  * Preconfigured test for SVG files under the xml-batik/../beSuite
  * directory.
  *
- * @author <a href="vhardy@apache.org">Vincent Hardy</a>
+ * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
  * @version $Id$
  */
 public class BERenderingTest extends PreconfiguredRenderingTest {
diff --git a/test-sources/org/apache/batik/test/svg/JSVGRenderingAccuracyTest.java b/test-sources/org/apache/batik/test/svg/JSVGRenderingAccuracyTest.java
index 4360ee6..c1e6eec 100644
--- a/test-sources/org/apache/batik/test/svg/JSVGRenderingAccuracyTest.java
+++ b/test-sources/org/apache/batik/test/svg/JSVGRenderingAccuracyTest.java
@@ -43,7 +43,7 @@
  *
  * Complete Class Desc
  *
- * @author <a href="mailto:deweese@apache.org>l449433</a>
+ * @author <a href="mailto:deweese@apache.org">l449433</a>
  * @version $Id$
  */
 public class JSVGRenderingAccuracyTest extends SamplesRenderingTest 
diff --git a/test-sources/org/apache/batik/test/svg/PreconfiguredRenderingTest.java b/test-sources/org/apache/batik/test/svg/PreconfiguredRenderingTest.java
index fb7c9ef..ccbc915 100644
--- a/test-sources/org/apache/batik/test/svg/PreconfiguredRenderingTest.java
+++ b/test-sources/org/apache/batik/test/svg/PreconfiguredRenderingTest.java
@@ -23,7 +23,7 @@
  * Convenience class for creating a SVGRenderingAccuracyTest with predefined
  * rules for the various configuration parameters.
  *
- * @author <a href="vhardy@apache.org">Vincent Hardy</a>
+ * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
  * @version $Id$
  */
 public abstract class PreconfiguredRenderingTest extends SVGRenderingAccuracyTest {
diff --git a/test-sources/org/apache/batik/test/svg/SVGOnLoadExceptionTest.java b/test-sources/org/apache/batik/test/svg/SVGOnLoadExceptionTest.java
index e4e8b08..d52c881 100644
--- a/test-sources/org/apache/batik/test/svg/SVGOnLoadExceptionTest.java
+++ b/test-sources/org/apache/batik/test/svg/SVGOnLoadExceptionTest.java
@@ -22,6 +22,7 @@
 import java.net.URL;
 
 import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
 import org.apache.batik.bridge.BaseScriptingEnvironment;
 import org.apache.batik.bridge.BridgeContext;
@@ -87,6 +88,11 @@
  */
 public class SVGOnLoadExceptionTest extends AbstractTest {
     /**
+     * Value for the script having successfully run.
+     */
+    public static final String RAN = "ran";
+
+    /**
      * Error when the expected exception did not occur
      */
     public static final String ERROR_EXCEPTION_DID_NOT_OCCUR
@@ -107,6 +113,12 @@
         = "SVGOnLoadExceptionTest.error.unexpected.error.code";
 
     /**
+     * Error when the script does not run as expected.
+     */
+    public static final String ERROR_SCRIPT_DID_NOT_RUN
+        = "SVGOnLoadExceptionTest.error.script.did.not.run";
+
+    /**
      * Entry describing the unexpected exception
      */
     public static final String ENTRY_KEY_UNEXPECTED_EXCEPTION
@@ -131,6 +143,12 @@
         = "SVGOnLoadExceptionTest.entry.key.expected.exception";
 
     /**
+     * Entry describing the unexpected exception
+     */
+    public static final String ENTRY_KEY_UNEXPECTED_RESULT
+        = "SVGOnLoadExceptionTest.entry.key.unexpected.result";
+
+    /**
      * Value used to disable error code check on BridgeExceptions
      */
     public static final String ERROR_CODE_NO_CHECK
@@ -354,16 +372,18 @@
                 permissions.add(new FilePermission(fileName, "read"));
                 permissions.add(new RuntimePermission("accessDeclaredMembers"));
 
-                ProtectionDomain domain = new ProtectionDomain(null, permissions);
-                AccessControlContext ctx = new AccessControlContext
-                    (new ProtectionDomain[] {domain});
+                ProtectionDomain domain;
+                AccessControlContext ctx;
+                domain = new ProtectionDomain(null, permissions);
+                ctx = new AccessControlContext(new ProtectionDomain[]{domain});
 
                 try {
-                    return (TestReport)AccessController.doPrivileged(new PrivilegedExceptionAction() {
-                            public Object run() throws Exception {
-                                return testImpl();
-                            }
-                        }, ctx);
+                    return (TestReport)AccessController.doPrivileged
+                        (new PrivilegedExceptionAction() {
+                                public Object run() throws Exception {
+                                    return testImpl();
+                                }
+                            }, ctx);
                 } catch (PrivilegedActionException pae) {
                     throw pae.getException();
                 }
@@ -390,6 +410,7 @@
         try {
             doc = f.createDocument(svgURL);
         } catch(Exception e){
+            e.printStackTrace();
             return handleException(e);
         } 
         
@@ -423,12 +444,26 @@
         } 
         
         //
-        // If we got here, it means that the expected exception did not
-        // happen. Report an error
-        //
-        TestReport report = reportError(ERROR_EXCEPTION_DID_NOT_OCCUR);
-        report.addDescriptionEntry(ENTRY_KEY_EXPECTED_EXCEPTION,
-                                   expectedExceptionClass);
+        // If we got here, it means that an exception did not
+        // happen. Check if this is expected.
+        TestReport report = null;
+        if (expectedExceptionClass == null) {
+            // No error was expected then check that the script ran.
+            Element elem = doc.getElementById("testResult");
+            String s = elem.getAttributeNS(null, "result");
+            if (RAN.equals(s)) {
+                report = reportSuccess();
+            } else {
+                report = reportError(ERROR_SCRIPT_DID_NOT_RUN);
+                report.addDescriptionEntry(ENTRY_KEY_UNEXPECTED_RESULT,
+                                           s);
+            }
+        }
+        if (report == null) {
+            report = reportError(ERROR_EXCEPTION_DID_NOT_OCCUR);
+            report.addDescriptionEntry(ENTRY_KEY_EXPECTED_EXCEPTION,
+                                       expectedExceptionClass);
+        }
         return report;
     }
 
@@ -512,11 +547,11 @@
                     result = new RelaxedScriptSecurity(scriptType,
                                                      scriptURL,
                                                      docURL);
-                } else if ("DOCUMENT".equals(resourceOrigin)) {
+                } else if ("DOCUMENT".equals(scriptOrigin)) {
                     result = new DefaultScriptSecurity(scriptType,
                                                      scriptURL,
                                                      docURL);
-                } else if ("EMBEDED".equals(resourceOrigin)) {
+                } else if ("EMBEDED".equals(scriptOrigin)) {
                     result = new EmbededScriptSecurity(scriptType,
                                                      scriptURL,
                                                      docURL);
diff --git a/test-sources/org/apache/batik/test/svg/SVGTextContentRenderingAccuracyTest.java b/test-sources/org/apache/batik/test/svg/SVGTextContentRenderingAccuracyTest.java
index dc6e4aa..4a6a6f1 100644
--- a/test-sources/org/apache/batik/test/svg/SVGTextContentRenderingAccuracyTest.java
+++ b/test-sources/org/apache/batik/test/svg/SVGTextContentRenderingAccuracyTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.test.svg;
 
diff --git a/test-sources/org/apache/batik/test/svg/SamplesRenderingTest.java b/test-sources/org/apache/batik/test/svg/SamplesRenderingTest.java
index 9a9da3b..4d4e2d1 100644
--- a/test-sources/org/apache/batik/test/svg/SamplesRenderingTest.java
+++ b/test-sources/org/apache/batik/test/svg/SamplesRenderingTest.java
@@ -20,7 +20,7 @@
 /**
  * Preconfigured test for SVG files under the xml-batik directory.
  *
- * @author <a href="vhardy@apache.org">Vincent Hardy</a>
+ * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
  * @version $Id$
  */
 public class SamplesRenderingTest extends PreconfiguredRenderingTest {
diff --git a/test-sources/org/apache/batik/test/util/ImageCompareTest.java b/test-sources/org/apache/batik/test/util/ImageCompareTest.java
index 10aba5d..457a3aa 100644
--- a/test-sources/org/apache/batik/test/util/ImageCompareTest.java
+++ b/test-sources/org/apache/batik/test/util/ImageCompareTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.test.util;
 
@@ -78,7 +44,7 @@
  * two images are identical. It fails otherwise, producing a report
  * describing why the two images are different.
  *
- * @author <a href="vhardy@apache.org">Vincent Hardy</a>
+ * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
  * @version $Id$
  */
 public class ImageCompareTest extends AbstractTest {
diff --git a/test-sources/org/apache/batik/test/xml/XTSConstants.java b/test-sources/org/apache/batik/test/xml/XTSConstants.java
index 35e6ad4..b8dcaf0 100644
--- a/test-sources/org/apache/batik/test/xml/XTSConstants.java
+++ b/test-sources/org/apache/batik/test/xml/XTSConstants.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.test.xml;
 
diff --git a/test-sources/org/apache/batik/transcoder/TranscoderInputTest.java b/test-sources/org/apache/batik/transcoder/TranscoderInputTest.java
index 984f92f..51bb52a 100755
--- a/test-sources/org/apache/batik/transcoder/TranscoderInputTest.java
+++ b/test-sources/org/apache/batik/transcoder/TranscoderInputTest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.transcoder;
 
diff --git a/test-sources/org/apache/batik/transcoder/image/URITest.java b/test-sources/org/apache/batik/transcoder/image/URITest.java
index 1ab013b..57a0228 100644
--- a/test-sources/org/apache/batik/transcoder/image/URITest.java
+++ b/test-sources/org/apache/batik/transcoder/image/URITest.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2004 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.
+ * 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.batik.transcoder.image;
 
diff --git a/test-sources/org/apache/batik/util/RunnableQueueTest.java b/test-sources/org/apache/batik/util/RunnableQueueTest.java
index fe0efcc..8a8e4b9 100644
--- a/test-sources/org/apache/batik/util/RunnableQueueTest.java
+++ b/test-sources/org/apache/batik/util/RunnableQueueTest.java
@@ -37,9 +37,12 @@
      * @param sync     Should requests be made synchronously (from
      *                 different threads).
      */
-    public RunnableQueueTest(int nThreads, boolean sync) {
+    public RunnableQueueTest(int nThreads) {
         this.nThreads = nThreads;
     }
+    public RunnableQueueTest(Integer nThreads) {
+        this((nThreads==null)?10:nThreads.intValue());
+    }
         
         /**
          * Returns this Test's name
@@ -203,7 +206,7 @@
     }
 
     public static void main(String []args) {
-        RunnableQueueTest rqt = new RunnableQueueTest(20, false);
+        RunnableQueueTest rqt = new RunnableQueueTest(20);
         try {
             rqt.runImpl();
         } catch (Exception e) {
diff --git a/test-sources/org/apache/batik/util/ThreadPounder.java b/test-sources/org/apache/batik/util/ThreadPounder.java
index 4a48387..39284f0 100644
--- a/test-sources/org/apache/batik/util/ThreadPounder.java
+++ b/test-sources/org/apache/batik/util/ThreadPounder.java
@@ -1,52 +1,18 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Copyright 1999-2003,2005 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.
+ * 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.batik.util;
 
diff --git a/xdocs/book.xml b/xdocs/book.xml
index 34ac723..7724fac 100644
--- a/xdocs/book.xml
+++ b/xdocs/book.xml
@@ -2,7 +2,7 @@
 
 <!--
 
-   Copyright 2000,2002-2004  The Apache Software Foundation 
+   Copyright 2000-2005  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.
@@ -24,11 +24,11 @@
 <!-- version $Id$        -->
 <!-- ========================================================================= -->
 
-<book title="Apache Batik documentation" copyright="2000-2002 The Apache Software Foundation">
+<book title="Apache Batik documentation" copyright="2000-2005 The Apache Software Foundation">
     <!-- ======================= -->
     <!-- Home                    -->
     <!-- ======================= -->
-    <external                    label="Home"                      href="http://xml.apache.org/"/>
+    <external                    label="Home"                      href="http://xmlgraphics.apache.org/"/>
     <separator/>
 
     <!-- ======================= -->
@@ -36,6 +36,7 @@
     <!-- ======================= -->
     <page id="index"              label="Overview"                 source="index.xml"/>
     <faqs id="faqs"               label="FAQ"                      source="faq.xml"/>
+    <external                     label="Wiki"                     href="http://wiki.apache.org/xmlgraphics-batik/FrontPage" />
     <page id="license"            label="License"                  source="license.xml"/>
     <external                     label="Download"                 href="http://www.apache.org/dyn/closer.cgi/xml/batik" />
     <page id="install"            label="Install"                  source="installing.xml"/>
@@ -90,7 +91,7 @@
     <!-- ======================= -->
     <!-- Admin / Status          -->
     <!-- ======================= -->
-    <page id="cvs"                label="CVS Repository"           source="cvs.xml"/>
+    <page id="svn"                label="SVN Repository"           source="svn.xml"/>
     <external                     label="Bug Database"             href="http://issues.apache.org/bugzilla"/>
     <separator/>
     <page id="status"             label="Status"                   source="status.xml" />
diff --git a/xdocs/faq.xml b/xdocs/faq.xml
index 1c704dd..492dcc8 100644
--- a/xdocs/faq.xml
+++ b/xdocs/faq.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!--
 
-   Copyright 2000-2004  The Apache Software Foundation 
+   Copyright 2000-2005  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.
@@ -314,11 +314,11 @@
         </p>
         <p>
         For direct participation, we suggest you to subscribe to the
-        <link href="http://xml.apache.org/mail.html">Batik mailing
+        <link href="http://xmlgraphics.apache.org/mail.html">Batik mailing
         list</link> (follow the link for information on how to
         subscribe and to access the mail list archives), and to
         checkout the <link
-        href="http://cvs.apache.org/viewcvs.cgi/xml-batik/">latest
+		href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/batik/">latest
         code</link>.
         </p>
     </answer>
@@ -510,7 +510,7 @@
     <answer>
         <p>
         You can submit bug fixes and patches to the <link
-        href="mailto:batik-dev@xml.apache.org">Batik developers</link>
+        href="mailto:batik-dev@xmlgraphics.apache.org">Batik developers</link>
         mailing list and you can enter bugs in <link
         href="http://issues.apache.org/bugzilla/">Bugzilla</link>.
         </p>
@@ -761,11 +761,12 @@
 </faq>
 <faq>
     <question>
-    How do I checkout the latest CVS version of Batik?
+    How do I checkout the latest SVN version of Batik?
     </question> 
     <answer>
       <p>You just have to follow the instructions posted on the
-      <link href="http://xml.apache.org/cvs.html">XML Apache CVS page</link>.
+      <link href="http://xmlgraphics.apache.org/repo.html">Apache 
+      XML Graphics code repository page</link>.
       </p>
     </answer>
 </faq>
diff --git a/xdocs/images/splash.png b/xdocs/images/splash.png
index 670bfc0..f056654 100644
--- a/xdocs/images/splash.png
+++ b/xdocs/images/splash.png
Binary files differ
diff --git a/xdocs/images/splash.svg b/xdocs/images/splash.svg
index f6ce186..7dd1dac 100644
--- a/xdocs/images/splash.svg
+++ b/xdocs/images/splash.svg
@@ -1,21 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-   Copyright 2002-2004  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.
-   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.
-
--->
 <svg xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 492 150" height="150" width="492" id="body">
 <title>Batik URL card for JavaOne 2001</title>
 <defs>
@@ -53,7 +36,7 @@
 <use height="131" width="114" x="46" y="11" xlink:href="#Batik_Squiggle" filter="url(#dropShadow)"/>
 <g filter="url(#dropShadow)" fill="white" text-anchor="middle" font-size="75" font-family="'20th Century Font', 'Futura XBlk BT'" id="topText">
 <text y="95" x="246">
-<tspan font-size="95">batik</tspan>1.5.1</text>
+<tspan font-size="95">batik</tspan>1.6</text>
 <text y="130" x="246" font-size="17">http://xml.apache.org/batik</text>
 </g>
 </g>
diff --git a/xdocs/images/splash.xsl b/xdocs/images/splash.xsl
index e875a00..1723a12 100644
--- a/xdocs/images/splash.xsl
+++ b/xdocs/images/splash.xsl
@@ -1,20 +1,29 @@
 <?xml version="1.0" standalone="no"?>
-<!-- ========================================================================= -->
-<!-- Copyright (C) The Apache Software Foundation. All rights reserved.        -->
-<!--                                                                           -->
-<!-- This software is published under the terms of the Apache Software License -->
-<!-- version 1.1, a copy of which has been included with this distribution in  -->
-<!-- the LICENSE file.                                                         -->
-<!-- ========================================================================= -->
+<!--
 
-<!-- ========================================================================= -->
-<!-- This simple XSL stylesheet is used to automatically generate the splash   -->
-<!-- screen for the documentation and the Squiggle browser. See the 'splash'   -->
-<!-- target in build.xml.                                                      -->
-<!--                                                                           -->
-<!-- @author vincent.hardy@eng.sun.com                                         -->
-<!-- @version $Id$      -->
-<!-- ========================================================================= -->
+   Copyright 2002,2004-2005  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.
+   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.
+
+-->
+<!-- ====================================================================== -->
+<!-- This simple XSL stylesheet is used to automatically generate the       -->
+<!-- splash screen for the documentation and the Squiggle browser. See the  -->
+<!-- 'splash' target in build.xml.                                          -->
+<!--                                                                        -->
+<!-- @author vincent.hardy@eng.sun.com                                      -->
+<!-- @version $Id$       -->
+<!-- ====================================================================== -->
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
                               xmlns:xlink="http://www.w3.org/1999/xlink"
diff --git a/xdocs/installing.xml b/xdocs/installing.xml
index 4223a38..d74d3c7 100644
--- a/xdocs/installing.xml
+++ b/xdocs/installing.xml
@@ -83,7 +83,7 @@
             distribution</em> contains a complete snapshot of
           the Batik source code, documentation, regression tools
           and utilities as well as the script for building
-          Batik. That distribution is a snapshot of the CVS
+          Batik. That distribution is a snapshot of the SVN
           repository. This is the recommended distribution for
           developers who want to dive into the code and
           understand how Batik can be integrated in their
@@ -95,20 +95,21 @@
       </ul>
 
       <p>We make nightly copies of the source tree available from the
-      <link href="http://cvs.apache.org/builds/xml-batik">Apache
+      <link href="http://svn.apache.org/builds/xml-batik">Apache
       build</link> server. These builds represent the current state of
       development and may or may not be as stable as releases.
       There are two types of distributions provided.</p>
       <ul>
-        <li><strong>batik-cvs-</strong><em>date</em><strong>.zip</strong>
-          (e.g., <code>batik-cvs-03-09-26.zip</code>)<br/> 
+        <li><strong>batik-svn-</strong><em>date</em><strong>.zip</strong>
+          or <strong>batik-cvs-</strong><em>date</em><strong>.zip</strong>
+          (e.g., <code>batik-svn-03-09-26.zip</code>)<br/> 
 
-          This contains a complete copy of the CVS tree, including
-          support for running <link href="test.html">regard</link>
+          This contains a complete copy of the SVN (or old CVS) tree,
+          including support for running <link href="test.html">regard</link>
           Batik's regression testing utility.  In particular this
           includes all the reference images for testing.  Developers
           are encouraged to get these or better use <link
-          href="cvs.html">CVS</link> directly.
+          href="svn.html">SVN</link> directly.
         </li>
         <li><strong>batik-src-</strong><em>date</em><strong>.zip</strong>
           (e.g., <code>batik-src-03-09-26.zip</code>)<br/> 
diff --git a/xdocs/mail-lists.xml b/xdocs/mail-lists.xml
index e695eec..1855686 100755
--- a/xdocs/mail-lists.xml
+++ b/xdocs/mail-lists.xml
@@ -4,7 +4,7 @@
 
 <!--
 
-   Copyright 2001-2004  The Apache Software Foundation 
+   Copyright 2001-2005  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.
@@ -39,16 +39,22 @@
     mailing list, please first look at the following resources in this order:</p>
    <ol>
     <li><link href="faqs.html">Batik FAQs</link></li>
-    <li><link href="http://mail-archives.apache.org/eyebrowse/SummarizeList?listName=batik-users@xml.apache.org">Batik-Users Archive</link></li>
-    <li><link href="http://mail-archives.apache.org/eyebrowse/SummarizeList?listName=batik-dev@xml.apache.org">Batik-Dev Archive</link></li>
+    <li>Batik-Users Archive (check links below)</li>
+    <li>Batik-Dev Archive (check links below)</li>
    </ol>
   </s1>
 
   <s1 title="Batik Users">
-   <p><link href="mailto:batik-users-subscribe@xml.apache.org">Subscribe</link>
-      <link href="mailto:batik-users-unsubscribe@xml.apache.org">Unsubscribe</link>
-      <link href="http://mail-archives.apache.org/eyebrowse/SummarizeList?listName=batik-users@xml.apache.org">Archive</link>
+   <p><link href="mailto:batik-users-subscribe@xmlgraphics.apache.org">Subscribe</link>
+      <link href="mailto:batik-users-unsubscribe@xmlgraphics.apache.org">Unsubscribe</link>
    </p>
+   
+   <p><strong>Archives:</strong></p>
+   <ul>
+    <li><link href="http://mail-archives.eu.apache.org/mod_mbox/xmlgraphics-batik-users/">mod_mbox Archives</link></li>
+    <li><link href="http://xmlgraphics.apache.org/mail/batik-users/">gzipped mbox files</link></li>
+    <li><link href="http://mail-archives.apache.org/eyebrowse/SummarizeList?listName=batik-users@xml.apache.org">Eyebrowse Archive</link> (currently broken)</li>
+   </ul>
 
    <p>The general Batik list, for problems using Batik, bug reports... 
    This is not an appropriate list for general SVG questions, you might try
@@ -63,11 +69,16 @@
   </s1>
 
   <s1 title="Batik Dev">
-   <p><link href="mailto:batik-dev-subscribe@xml.apache.org">Subscribe</link>
-      <link href="mailto:batik-dev-unsubscribe@xml.apache.org">Unsubscribe</link>
-      <link href="http://mail-archives.apache.org/eyebrowse/SummarizeList?listName=batik-dev@xml.apache.org">Archive</link>
+   <p><link href="mailto:batik-dev-subscribe@xmlgraphics.apache.org">Subscribe</link>
+      <link href="mailto:batik-dev-unsubscribe@xmlgraphics.apache.org">Unsubscribe</link>
    </p>
 
+   <p><strong>Archives:</strong></p>
+   <ul>
+    <li><link href="http://mail-archives.eu.apache.org/mod_mbox/xmlgraphics-batik-dev/">mod_mbox Archives</link></li>
+    <li><link href="http://xmlgraphics.apache.org/mail/batik-dev/">gzipped mbox files</link></li>
+    <li><link href="http://mail-archives.apache.org/eyebrowse/SummarizeList?listName=batik-dev@xml.apache.org">Eyebrowse Archive</link> (currently broken)</li>
+   </ul>
    <p>This list is for developers <strong>working on</strong> or wanting to work on
     Batik itself (not developers merely working <strong>with</strong> Batik),
     for patches to Batik to be posted,...
diff --git a/xdocs/pr.xml b/xdocs/pr.xml
index 9dc3491..af075e2 100644
--- a/xdocs/pr.xml
+++ b/xdocs/pr.xml
@@ -3,7 +3,7 @@
 
 <!--
 
-   Copyright 2000-2002  The Apache Software Foundation 
+   Copyright 2000-2002,2004-2005  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.
@@ -189,7 +189,7 @@
 representation capabilities.</p>
  
 <p>The Batik Project encourages participation through its mailing list:
-<link href="http://xml.apache.org/mail.html">http://xml.apache.org/mail.html</link></p>
+<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>
diff --git a/xdocs/site-book.xml b/xdocs/site-book.xml
index f8703fa..7724fac 100644
--- a/xdocs/site-book.xml
+++ b/xdocs/site-book.xml
@@ -2,7 +2,7 @@
 
 <!--
 
-   Copyright 2000-2004  The Apache Software Foundation 
+   Copyright 2000-2005  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.
@@ -24,11 +24,11 @@
 <!-- version $Id$        -->
 <!-- ========================================================================= -->
 
-<book title="Apache Batik documentation" copyright="2000-2002 The Apache Software Foundation">
+<book title="Apache Batik documentation" copyright="2000-2005 The Apache Software Foundation">
     <!-- ======================= -->
     <!-- Home                    -->
     <!-- ======================= -->
-    <external                    label="Home"                      href="http://xml.apache.org/"/>
+    <external                    label="Home"                      href="http://xmlgraphics.apache.org/"/>
     <separator/>
 
     <!-- ======================= -->
@@ -36,6 +36,7 @@
     <!-- ======================= -->
     <page id="index"              label="Overview"                 source="index.xml"/>
     <faqs id="faqs"               label="FAQ"                      source="faq.xml"/>
+    <external                     label="Wiki"                     href="http://wiki.apache.org/xmlgraphics-batik/FrontPage" />
     <page id="license"            label="License"                  source="license.xml"/>
     <external                     label="Download"                 href="http://www.apache.org/dyn/closer.cgi/xml/batik" />
     <page id="install"            label="Install"                  source="installing.xml"/>
@@ -90,7 +91,7 @@
     <!-- ======================= -->
     <!-- Admin / Status          -->
     <!-- ======================= -->
-    <page id="cvs"                label="CVS Repository"           source="cvs.xml"/>
+    <page id="svn"                label="SVN Repository"           source="svn.xml"/>
     <external                     label="Bug Database"             href="http://issues.apache.org/bugzilla"/>
     <separator/>
     <page id="status"             label="Status"                   source="status.xml" />
diff --git a/xdocs/svggen.xml b/xdocs/svggen.xml
index c22aafa..a1eabce 100644
--- a/xdocs/svggen.xml
+++ b/xdocs/svggen.xml
@@ -244,7 +244,7 @@
   <source>
 
 SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(myFactory);
-ImageHandler ihandler = new ImageHandlerPNGEncoder("res/images", null);
+GenericImageHandler ihandler = new ImageHandlerPNGEncoder("res/images", null);
 ctx.setImageHandler(ihandler);
 SVGGraphics2D g2d = new SVGGraphics2D(ctx, false);
   </source>
@@ -306,7 +306,7 @@
   </p>
   <source>
 
-public class StyleSheetStyleHandler {
+public class StyleSheetStyleHandler implements StyleHandler {
     private CDATASection styleSheet;
     // Build the handler with a reference to the StyleSheet section
     public StyleSheetStyleHandler(CDATASection styleSheet) {
@@ -345,7 +345,7 @@
 // use the g2d to dump drawings (component.paint(g2d))
 
 // add a style sheet to the definition section
-Element root = g2d.getRoot();
+SVGSVGElement root = (SVGSVGElement)g2d.getRoot();
 Element defs = root.getElementById(SVGSyntax.ID_PREFIX_GENERIC_DEFS);
 Element style = myFactory.createElementNS(SVGSyntax.SVG_NAMESPACE_URI, 
                                           SVGSyntax.SVG_STYLE_TAG);
@@ -377,7 +377,7 @@
           Element grad = generatorCtx.getDOMFactory().
                createElementNS(SVGSyntax.SVG_NAMESPACE_URI, 
                                SVGSyntax.SVG_LINEAR_GRADIENT_TAG);
-          grad.setAttributeNS(null, SVGSyntax.SVG_ID_ATTRIBUTE, ref);
+          grad.setAttributeNS(null, SVGSyntax.SVG_ID_ATTRIBUTE, id);
           grad.setAttributeNS(null, 
 	                      SVGSyntax.SVG_GRADIENT_UNITS_ATTRIBUTE, 
 	                      SVGSyntax.SVG_USER_SPACE_ON_USE_VALUE);
diff --git a/xdocs/cvs.xml b/xdocs/svn.xml
similarity index 69%
rename from xdocs/cvs.xml
rename to xdocs/svn.xml
index 081c702..e6b0c66 100644
--- a/xdocs/cvs.xml
+++ b/xdocs/svn.xml
@@ -25,8 +25,8 @@
 <!-- ====================================================================== -->
 <document>
   <header>
-    <title>Batik CVS Repository</title>
-    <subtitle>How to access Batik from CVS</subtitle>
+    <title>Batik SVN Repository</title>
+    <subtitle>How to access Batik from Subversion</subtitle>
     <authors>
       <person name="Thomas DeWeese" email="deweese@apache.org" />
     </authors>
@@ -40,15 +40,12 @@
       </p>
       <ul>
         <li>The first, and prefered method for developers, is
-          through AnonCVS. Anyone can checkout source code from
-          our anonymous CVS server. To do so, simply use the
-          following commands (if you are using a GUI CVS client,
+          through anonymouse Subversion. Anyone can checkout source code from
+          our anonymous SVN server. To do so, simply use the
+          following commands (if you are using a GUI SVN client,
           configure it appropriately):<br/>
           
-          <code>cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login</code><br/> 
-          <code>password: anoncvs</code><br/> 
-          <br/> 
-          <code>cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic checkout xml-batik</code><br/><br/>
+          <code>svn checkout http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/</code>
         </li>
 
         <li>The second and probably easiest is by downloading a <link
@@ -59,18 +56,19 @@
         </li>
 
         <li>The third is by downloading a <link
-            href="http://cvs.apache.org/builds/xml-batik">nightly
+            href="http://svn.apache.org/builds/xml-batik">nightly
             build</link>.  The '-cvs-' packages contain a complete
-          copy of CVS.  The '-src-' packages contain only what is
-          needed to build and run Batik.  The biggest difference
-          being that CVS includes the <link href="test.html">test
-            infrastructure</link>.<br/>
+          copy of CVS for a given date (before the move to Subversion).
+          Snapshots of the SVN repository will be made available soon.
+          The '-src-' packages contain only what is needed to build and
+          run Batik.  The biggest difference being that SVN includes the
+          <link href="test.html">test infrastructure</link>.<br/>
         </li>
 
         <li>The fourth is through <link
-            href="http://cvs.apache.org/viewcvs.cgi/xml-batik"
+            href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/batik/"
             >viewcvs</link>.  This provides the ability to traverse
-          the CVS repository over the web, and check differences
+          the SVN repository over the web, and check differences
           between versions.  This is generally only useful for tracking
           a small number of files/changes.
         </li>
diff --git a/xdocs/testInfrastructure.xml b/xdocs/testInfrastructure.xml
index 760e786..e2f2a06 100644
--- a/xdocs/testInfrastructure.xml
+++ b/xdocs/testInfrastructure.xml
@@ -369,7 +369,7 @@
         <p><em>Daily usage</em></p>
         <p />
         <p>Once the intial set-up has been done, you can use regard by simply updating your 
-        CVS copy, including the test-references. If no change occurs, your test will keep passing
+        SVN copy, including the test-references. If no change occurs, your test will keep passing
         with your reference images. If a test fails (e.g., if someone checks in a new reference
         image from a platform different than the one you are using, you will have to check if it is
         because of system specific reasons or if there is a bigger problem.</p>
@@ -452,4 +452,4 @@
         </s1>
 
     </body>
-</document>
\ No newline at end of file
+</document>
diff --git a/xdocs/whoAreWe.xml b/xdocs/whoAreWe.xml
index f38ea2a..cb3d5b8 100644
--- a/xdocs/whoAreWe.xml
+++ b/xdocs/whoAreWe.xml
@@ -1,18 +1,28 @@
 <?xml version="1.0"?>
 <!DOCTYPE document SYSTEM "./dtd/document-v10.dtd">
 
-<!-- ========================================================================= -->
-<!-- Copyright (C) The Apache Software Foundation. All rights reserved.        -->
-<!--                                                                           -->
-<!-- This software is published under the terms of the Apache Software License -->
-<!-- version 1.1, a copy of which has been included with this distribution in  -->
-<!-- the LICENSE file.                                                         -->
-<!-- ========================================================================= -->
+<!--
 
-<!-- ========================================================================= -->
-<!-- author stephane@hillion.org                                               -->
-<!-- version $Id$ -->
-<!-- ========================================================================= -->
+   Copyright 2000-2003,2005  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.
+   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.
+
+-->
+
+<!-- ====================================================================== -->
+<!-- author stephane@hillion.org                                            -->
+<!-- version $Id$    -->
+<!-- ====================================================================== -->
 <document>
     <header>
         <title>Contributors</title>
@@ -182,7 +192,7 @@
         <p>
         In addition, <link href="mailto:James.Davidson@eng.sun.com">James Davidson</link>
         and <link href="mailto:stefano@apache.org">Stefano Mazzochi</link> , two Apache veterans who helped the
-        Batik team start the project at Apache, also have commit access to the CVS repository.
+        Batik team start the project at Apache, also have commit access to the SVN repository.
         </p>        
       </s1>