Compiled Batik 1.19 with the following changes. 

Used: Java 1.8. Ran: /opt/maven/bin/mvn clean install

For that:
- Checked that all modules batik-test-* are commented out in pom.xml

* Fixes Batik bug BATIK-1090; 
Embedded SVG reports "Content is not allowed in prolog".
See https://issues.apache.org/jira/browse/BATIK-1090
Example: outer_DATA_SVG_BUG_BATIK-1090.svg

batik-util/src/main/java/org/apache/batik/util/
===============================================================
--- ParsedURLDataProtocolHandler.java.ORI	2024-10-01 12:21:04.000000000 +0200
+++ ParsedURLDataProtocolHandler.java	2024-10-29 11:30:30.162294706 +0100
@@ -43,8 +43,16 @@
     }
 
     public ParsedURLData parseURL(ParsedURL baseURL, String urlStr) {
-        // No relative form...
-        return parseURL(urlStr);
+        if (urlStr != null && urlStr.startsWith("#") && 
+            baseURL != null && "data".equals(baseURL.data.protocol)) {
+            // No relative form per se. Just record this ref in a copy of the
+            // base DataParsedURLData.
+            DataParsedURLData ret = ((DataParsedURLData) baseURL.data).copy();
+            ret.ref = urlStr.substring(1);
+            return ret;
+        } else {
+            return parseURL(urlStr);
+        }
     }
 
     public ParsedURLData parseURL(String urlStr) {
@@ -129,6 +137,21 @@
 
         String charset;
 
+        public DataParsedURLData copy() {
+            DataParsedURLData copy = new DataParsedURLData();
+
+            copy.protocol = protocol;
+            copy.host = host;
+            copy.port = port;
+            copy.path = path;
+            copy.ref = ref;
+            copy.contentType = contentType;
+            copy.contentEncoding = contentEncoding;
+            copy.charset = charset;
+
+            return copy;
+        }
+
         public boolean complete() {
             return path != null;
         }
===============================================================
