Author: tilman
Date: Thu Nov 13 13:54:20 2025
New Revision: 1929708

Log:
PDFBOX-6099: push/pop namespaces in rdf:RDF

Modified:
   
pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java

Modified: 
pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java
==============================================================================
--- 
pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java
    Thu Nov 13 11:34:39 2025        (r1929707)
+++ 
pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java
    Thu Nov 13 13:54:20 2025        (r1929708)
@@ -178,6 +178,7 @@ public class DomXmpParser
         // xpacket is OK and the is no more nodes
         // Now, parse the content of root
         Element rdfRdf = findDescriptionsParent(root);
+        nsFinder.push(rdfRdf); // PDFBOX-6099: push namespaces in rdf:RDF
         List<Element> descriptions = DomHelper.getElementChildren(rdfRdf);
         List<Element> dataDescriptions = new ArrayList<>(descriptions.size());
         for (Element description : descriptions)
@@ -201,6 +202,8 @@ public class DomXmpParser
             parseDescriptionRoot(xmp, description);
         }
 
+        nsFinder.pop();
+
         return xmp;
     }
 

Reply via email to