ExifTool Forum

ExifTool => The Image::ExifTool API => Topic started by: Przemek on July 02, 2013, 10:45:20 AM

Title: Name Schema
Post by: Przemek on July 02, 2013, 10:45:20 AM
In the similar way you can see EXIF Properties (http://ns.adobe.com/exif/1.0/) in the property tree is there a way to name new meta schema created with et. After adding new meta with the custom user tags I get Schema (http://mypage). I'd like to rename Schema to MyNewName. Thanks
Title: Re: Name Schema
Post by: Phil Harvey on July 02, 2013, 11:43:28 AM
I'm not sure exactly what you are asking, but there is an example of how to create your own custom XMP schema with ExifTool in the sample config file (https://exiftool.org/config.html).  In this example, the schema name is 'xxx', but you can change this to whatever you want.

- Phil
Title: Re: Name Schema
Post by: Przemek on January 21, 2014, 05:24:18 AM
(http://s15.postimg.org/6llywszpn/ref.png)

I'd like to rename 'Schema' to something else if possible. Thanks Phil.
Title: Re: Name Schema
Post by: Phil Harvey on January 21, 2014, 07:15:47 AM
You'll have to ask in a forum for the software you are using to see if this is possible.  The schema names in your screen shot are generated by whatever software you were running.

- Phil
Title: Re: Name Schema
Post by: Przemek on January 21, 2014, 07:20:14 AM
Schema was generated with exiftool using this example

%Image::ExifTool::UserDefined = (
   'Image::ExifTool::XMP::Main' => {
      myName => {
         SubDirectory => {
            Name => 'myName',
            TagTable => 'Image::ExifTool::UserDefined::myName',
         },
      },
   },
);

%Image::ExifTool::UserDefined::myName = (
   GROUPS => { 0 => 'XMP', 1 => 'XMP-myName', 2 => 'Image' },
   NAMESPACE => { 'myName' => 'http://ns.test.com/myName/1.0/' },
   WRITABLE => 'string',

   myNameInfo => {
      Struct => {
         NAMESPACE => { 'myNameInfo' => 'http://ns.test.com/myName/1.0/myNameInfo#' },
         STRUCT_NAME => 'myNameInfo',
         TestName => { },
         TestDisplayName => { },
         TestId => { },
      },
      List => 'Bag',
   },
   # shorten our flattened tag names
   myNameInfoTestName => {
      Name => 'TestName',
      Flat => 1,
   },
   myNameInfoTestDisplayName => {
      Name => 'TestDisplayName',
      Flat => 1,
   },
   myNameInfoTestId => {
      Name => 'TestId',
      Flat => 1,
   },
);

1; # end

exiftool -config config.cfg -xmp:TestName='taggger' ./1386075226_ipad.jpg
Title: Re: Name Schema
Post by: Phil Harvey on January 21, 2014, 07:40:46 AM
Right.  Notice that the word "Schema" doesn't exist anywhere in this config file.

- Phil
Title: Re: Name Schema
Post by: Przemek on January 21, 2014, 08:02:38 AM
It's not in the config file but after running ...

exiftool -config config.cfg -xmp:TestName='taggger' ./1386075226_ipad.jpg

Schema is being added in. Can this be set, named via the config file? Thanks Phil.
Title: Re: Name Schema
Post by: Phil Harvey on January 21, 2014, 08:45:16 AM
You should look at the actual XMP that was added:

exiftool -xmp -b ./1386075226_ipad.jpg

- Phil
Title: Re: Name Schema
Post by: Przemek on January 21, 2014, 08:49:49 AM
Based on

exiftool -xmp -b ./1386075226_ipad.jpg

<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 8.61'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>

<rdf:Description rdf:about=''
  xmlns:myName='http://ns.test.com/myName/1.0/'
  xmlns:myNameInfo='http://ns.test.com/myName/1.0/myNameInfo#'>
  <myName:myNameInfo>
   <rdf:Bag>
    <rdf:li rdf:parseType='Resource'>
     <myNameInfo:TestName>taggger</myNameInfo:TestName>
    </rdf:li>
   </rdf:Bag>
  </myName:myNameInfo>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>

The image represents the view in the Adobe Bridge. There is no Schema added in here either.

Thanks again Phil.
Title: Re: Name Schema
Post by: Phil Harvey on January 21, 2014, 08:51:54 AM
Exactly.  So all is good then?  You understand now that the schema description is something that the Adobe software is generating internally?

- Phil
Title: Re: Name Schema
Post by: Przemek on January 21, 2014, 08:57:02 AM
Looks like it. I assumed that there must be a way to generate a name for the 'Schema'. My idea was to create a section of the xmp tags that would be grouped under a single name. Bucket of xmp data that would represent a specific company etc.

Thanks Phil.