Author: tilman
Date: Sat Dec 27 12:54:36 2025
New Revision: 1930881
Log:
PDFBOX-6131: add test case for "Seq ..." and "Bag ..."
Added:
pdfbox/branches/2.0/xmpbox/src/test/resources/org/apache/xmpbox/xml/PDFBOX-6131-RMR6DEEUWZO6IM3A7WKRPX33SZMBTTQZ.xml
(contents, props changed)
Modified:
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Modified:
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
==============================================================================
---
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Sat Dec 27 12:54:30 2025 (r1930880)
+++
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Sat Dec 27 12:54:36 2025 (r1930881)
@@ -1529,4 +1529,18 @@ public class DomXmpParserTest
// non existant properties are treated as text, one might want to
change this in the future.
assertEquals("[headline=TextType:]",
photoshopSchema.getProperty("headline").toString());
}
-}
+
+ @Test
+ public void testPDFBox6131_2() throws IOException, XmpParsingException,
BadFieldValueException
+ {
+ // Contains "Seq Text" instead of "seq Text" and "Bag Text" instead of
"bag Text"
+ // from file RMR6DEEUWZO6IM3A7WKRPX33SZMBTTQZ
+ // Fairfax County Office of Community Revitalization
+ try (InputStream is =
DomXmpParser.class.getResourceAsStream("/org/apache/xmpbox/xml/PDFBOX-6131-RMR6DEEUWZO6IM3A7WKRPX33SZMBTTQZ.xml"))
+ {
+ DomXmpParser xmpParser = new DomXmpParser();
+ XMPMetadata xmp = xmpParser.parse(is);
+ assertEquals(1, xmp.getPDFIdentificationSchema().getPart());
+ }
+ }
+}
\ No newline at end of file
Added:
pdfbox/branches/2.0/xmpbox/src/test/resources/org/apache/xmpbox/xml/PDFBOX-6131-RMR6DEEUWZO6IM3A7WKRPX33SZMBTTQZ.xml
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++
pdfbox/branches/2.0/xmpbox/src/test/resources/org/apache/xmpbox/xml/PDFBOX-6131-RMR6DEEUWZO6IM3A7WKRPX33SZMBTTQZ.xml
Sat Dec 27 12:54:36 2025 (r1930881)
@@ -0,0 +1,214 @@
+<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
+<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.4-c005
78.147326, 2012/08/23-13:03:03 ">
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <rdf:Description rdf:about=""
+ xmlns:xmp="http://ns.adobe.com/xap/1.0/"
+ xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
+ xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"
+ xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:pdf="http://ns.adobe.com/pdf/1.3/"
+ xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/"
+ xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
+ xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
+ xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#"
+ xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type#">
+ <xmp:CreateDate>2018-08-20T11:45:47-04:00</xmp:CreateDate>
+ <xmp:CreatorTool>Adobe InDesign CS6 (Windows)</xmp:CreatorTool>
+ <xmp:ModifyDate>2018-08-21T11:31:57-04:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2018-08-21T11:31:57-04:00</xmp:MetadataDate>
+
<xmpMM:InstanceID>uuid:1a2539c6-3bdb-4b04-b610-c173cf00ba20</xmpMM:InstanceID>
+
<xmpMM:OriginalDocumentID>xmp.did:9C5C3DDF4670E611A317E9DADFEEA537</xmpMM:OriginalDocumentID>
+
<xmpMM:DocumentID>xmp.id:9776551B90A4E811B442A672B361405C</xmpMM:DocumentID>
+ <xmpMM:RenditionClass>proof:pdf</xmpMM:RenditionClass>
+ <xmpMM:VersionID>1</xmpMM:VersionID>
+ <xmpMM:DerivedFrom rdf:parseType="Resource">
+
<stRef:instanceID>xmp.iid:A068E61B2F9FE811B200FB60011BADCF</stRef:instanceID>
+
<stRef:documentID>xmp.did:689889CA0465E81193A9AB2BA9DD46BB</stRef:documentID>
+ <stRef:renditionClass>default</stRef:renditionClass>
+ </xmpMM:DerivedFrom>
+ <xmpMM:History>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+ <stEvt:action>converted</stEvt:action>
+ <stEvt:parameters>from application/x-indesign to
application/pdf</stEvt:parameters>
+ <stEvt:softwareAgent>Adobe InDesign CS6
(Windows)</stEvt:softwareAgent>
+ <stEvt:when>2018-08-20T11:45:47-04:00</stEvt:when>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <stEvt:action>converted</stEvt:action>
+
<stEvt:instanceID>uuid:34585cb1-a12c-4961-a53a-628153fa0513</stEvt:instanceID>
+ <stEvt:parameters>converted to PDF/A-1a</stEvt:parameters>
+ <stEvt:softwareAgent>pdfEngine</stEvt:softwareAgent>
+ <stEvt:when>2018-08-20T12:56:47-04:00</stEvt:when>
+ </rdf:li>
+ </rdf:Seq>
+ </xmpMM:History>
+ <dc:format>application/pdf</dc:format>
+ <dc:title>
+ <rdf:Alt>
+ <rdf:li xml:lang="x-default">Summary of Guidelines for
Development in Reston TSAs</rdf:li>
+ </rdf:Alt>
+ </dc:title>
+ <dc:description>
+ <rdf:Alt>
+ <rdf:li xml:lang="x-default"/>
+ </rdf:Alt>
+ </dc:description>
+ <dc:subject>
+ <rdf:Bag/>
+ </dc:subject>
+ <dc:creator>
+ <rdf:Seq>
+ <rdf:li/>
+ </rdf:Seq>
+ </dc:creator>
+ <pdf:Producer>Adobe PDF Library 10.0.1</pdf:Producer>
+ <pdf:Trapped>False</pdf:Trapped>
+ <pdf:Keywords/>
+ <pdfaid:part>1</pdfaid:part>
+ <pdfaid:conformance>A</pdfaid:conformance>
+ <pdfaExtension:schemas>
+ <rdf:Bag>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaSchema:namespaceURI>http://ns.adobe.com/xap/1.0/mm/</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>xmpMM</pdfaSchema:prefix>
+ <pdfaSchema:schema>XMP Media Management</pdfaSchema:schema>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>UUID based identifier for
specific incarnation of a document</pdfaProperty:description>
+ <pdfaProperty:name>InstanceID</pdfaProperty:name>
+ <pdfaProperty:valueType>URI</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>The common identifier for
all versions and renditions of a document.</pdfaProperty:description>
+
<pdfaProperty:name>OriginalDocumentID</pdfaProperty:name>
+ <pdfaProperty:valueType>URI</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>A reference to the
original document from which this one is derived. It is a minimal reference;
missing components can be assumed to be unchanged. For example, a new version
might only need to specify the instance ID and version number of the previous
version, or a rendition might only need to specify the instance ID and
rendition class of the original.</pdfaProperty:description>
+ <pdfaProperty:name>DerivedFrom</pdfaProperty:name>
+
<pdfaProperty:valueType>ResourceRef</pdfaProperty:valueType>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ <pdfaSchema:valueType>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaType:description>Identifies a portion of a
document. This can be a position at which the document has been changed since
the most recent event history (stEvt:changed). For a resource within an
xmpMM:Ingredients list, the ResourceRef uses this type to identify both the
portion of the containing document that refers to the resource, and the portion
of the referenced resource that is referenced.</pdfaType:description>
+
<pdfaType:namespaceURI>http://ns.adobe.com/xap/1.0/sType/Part#</pdfaType:namespaceURI>
+ <pdfaType:prefix>stPart</pdfaType:prefix>
+ <pdfaType:type>Part</pdfaType:type>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaSchema:namespaceURI>http://ns.adobe.com/exif/1.0/</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>exif</pdfaSchema:prefix>
+ <pdfaSchema:schema>EXIF for EXIF-specific
Properties</pdfaSchema:schema>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>EXIF tag 37121, 0x9101.
Configuration of components in data: 4 5 6 0 (if RGB compressed data), 1 2 3 0
(other cases). 0 = does not exist; 1 = Y; 2 = Cb; 3 = Cr; 4 = R; 5 = G; 6 =
B</pdfaProperty:description>
+
<pdfaProperty:name>ComponentsConfiguration</pdfaProperty:name>
+ <pdfaProperty:valueType>Seq
Integer</pdfaProperty:valueType>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaSchema:namespaceURI>http://ns.adobe.com/exif/1.0/aux/</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>aux</pdfaSchema:prefix>
+ <pdfaSchema:schema>EXIF schema for additional EXIF
properties</pdfaSchema:schema>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>A description of the lens
used to take the photograph. For example, "70-200 mm
f/2.8-4.0".</pdfaProperty:description>
+ <pdfaProperty:name>Lens</pdfaProperty:name>
+ <pdfaProperty:valueType>Bag
Text</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>The serial number of the
camera or camera body used to take the photograph.</pdfaProperty:description>
+ <pdfaProperty:name>SerialNumber</pdfaProperty:name>
+ <pdfaProperty:valueType>Bag
Text</pdfaProperty:valueType>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaSchema:namespaceURI>http://ns.adobe.com/pdf/1.3/</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>pdf</pdfaSchema:prefix>
+ <pdfaSchema:schema>Adobe PDF</pdfaSchema:schema>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>A name object indicating
whether the document has been modified to include trapping
information</pdfaProperty:description>
+ <pdfaProperty:name>Trapped</pdfaProperty:name>
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaSchema:namespaceURI>http://www.aiim.org/pdfa/ns/id/</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>pdfaid</pdfaSchema:prefix>
+ <pdfaSchema:schema>PDF/A ID Schema</pdfaSchema:schema>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Part of PDF/A
standard</pdfaProperty:description>
+ <pdfaProperty:name>part</pdfaProperty:name>
+
<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Amendment of PDF/A
standard</pdfaProperty:description>
+ <pdfaProperty:name>amd</pdfaProperty:name>
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+
<pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Conformance level of
PDF/A standard</pdfaProperty:description>
+ <pdfaProperty:name>conformance</pdfaProperty:name>
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ </rdf:li>
+ </rdf:Bag>
+ </pdfaExtension:schemas>
+ </rdf:Description>
+ </rdf:RDF>
+</x:xmpmeta>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<?xpacket end="w"?>
\ No newline at end of file