Slight adjustment of XMP indentation.

#802 Merged at 654a382
Repository
daniel_fort
Branch
manual_lens_info
Repository
hudson
Branch
manual_lens_info
Author
  1. Daniel Fort
Reviewers
Description

A couple of the XMP tags indentations are off.

Currently it looks like this:

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c011 79.156380, 2014/05/21-23:38:37        ">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:exif="http://ns.adobe.com/exif/1.0/"
    xmlns:aux="http://ns.adobe.com/exif/1.0/aux/"
    exif:ExifVersion="0230"
        exif:FNumber="14/10"
    exif:FocalLength="50/1"
    aux:Lens="Zeiss Planar T* 1.4/50 ZF.2"
>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>

Note the extra indentation on the "exif:FNumber" element and no indentation on the angle bracket that closes the "rdf:Description rdf:about" group. This pull request creates an XML that looks like this:

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c011 79.156380, 2014/05/21-23:38:37        ">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:exif="http://ns.adobe.com/exif/1.0/"
    xmlns:aux="http://ns.adobe.com/exif/1.0/aux/"
    exif:ExifVersion="0230"
    exif:FNumber="14/10"
    aux:Lens="Zeiss Planar T* 1.4/50 ZF.2"
    exif:FocalLength="50/1"
    >
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>

http://www.magiclantern.fm/forum/index.php?topic=18083.msg177906#msg177906

Comments (2)

  1. David Milligan

    It probably makes more sense for the spacing to be printed "with" the current line instead of each line printing the spacing for the next line. Try something like:

    xmp.template = [[
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c011 79.156380, 2014/05/21-23:38:37        ">
     <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
        xmlns:exif="http://ns.adobe.com/exif/1.0/"
        xmlns:aux="http://ns.adobe.com/exif/1.0/aux/"
        exif:ExifVersion="0230"%s>
      </rdf:Description>
     </rdf:RDF>
    </x:xmpmeta>
    ]]
    
    xmp.property_format = [[
    
        %s="%s"]]
    
    1. Daniel Fort author

      Beautiful--that's exactly what we wanted, right? Made the changes but also made a mess with my commits. It was a small change so I did it on the same branch like a1ex told me to do on pull request #798

      In any case, this looks perfect and verified working in Adobe Camera Raw.

      <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c011 79.156380, 2014/05/21-23:38:37        ">
       <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
        <rdf:Description rdf:about=""
          xmlns:exif="http://ns.adobe.com/exif/1.0/"
          xmlns:aux="http://ns.adobe.com/exif/1.0/aux/"
          exif:ExifVersion="0230"
          exif:FocalLength="50/1"
          exif:FNumber="14/10"
          aux:Lens="Zeiss Planar T* 1.4/50 ZF.2">
        </rdf:Description>
       </rdf:RDF>
      </x:xmpmeta>
      

      BTW--why aux:Lens and exif:FocalLength switched locations on my previous version is a mystery to me.