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

XMPBox removes namespaces on serialization

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 1.8.7, 2.0.29, 3.0.0 PDFBox, 4.0.0
    • None
    • XmpBox
    • 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

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

            Dates

              Created:
              Updated: