Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-2378

XMPBox removes namespaces on serialization

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.8.7
    • Fix Version/s: None
    • Component/s: XmpBox
    • Labels:
      None

      Description

      Bar.java
      InputStream zfExtensionIs = getClass().getResourceAsStream("/zf_extension.pdfbox.xmp");
      DomXmpParser builder = new DomXmpParser();
               zfDefaultXmp = builder.parse(zfExtensionIs);
      PdfaExtensionHelper.populateSchemaMapping(zfDefaultXmp);
      
      new XmpSerializer().serialize(zfDefaultXmp, new FileOutputStream("target/out.xmp.xml"), true);
      

      the incoming file

      incoming.xml
            <rdf:Description 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#" rdf:about="">
      

      outgoing file

      resulting.xml
      <rdf:Description xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" rdf:about="">
      

      why are the two namespaces gone?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vadimbauer Vadimo
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: