# Sample Exiv2 command file for XMP tags
# --------------------------------------

# Set basic properties. Exiv2 uses the value type of the XMP specification 
# for the property, if it is not specified. The default XMP value type
# for unknown properties is a simple text value.

# A simple text property.
set Xmp.dc.source      xmpsample.cpp

# An array item (unordered array).
set Xmp.dc.subject     "Palmtree"

# Add a 2nd array item
set Xmp.dc.subject     "Rubbertree"

# A language alternative (without a default)
set Xmp.dc.title       lang=en-US Sunset on the beach
set Xmp.dc.title       lang=de-DE Sonnenuntergang am Strand

# Any properties can be set provided the namespace is known.
set Xmp.dc.one         -1
set Xmp.dc.two         3.1415
set Xmp.dc.three       5/7
set Xmp.dc.four        255
set Xmp.dc.five        256
set Xmp.dc.six         false
set Xmp.dc.seven       Seven

# The value type can be specified. Exiv2 has support for a limited number
# of specific XMP types with built-in types: The basic XmpText, array 
# types XmpAlt (alternative array), XmpBag (unordered array), XmpSeq 
# (ordered array) and language alternatives LangAlt.

# Simple text property with explicitly specified value type
set Xmp.dc.format XmpText "image/jpeg"

# An ordered array
set Xmp.dc.creator XmpSeq "1) The first creator"
set Xmp.dc.creator  "2) The second creator"
set Xmp.dc.creator  "3) And another one"

# A language alternative. The default entry of a langauge alternative
# doesn't need a language qualifier.
set Xmp.dc.description LangAlt lang=de-DE Hallo, Welt
set Xmp.dc.description LangAlt Hello, World

# According to the XMP specification, Xmp.tiff.ImageDescription is an
# alias for Xmp.dc.description. Exiv2 treats an alias just like any
# other property.
set Xmp.tiff.ImageDescription TIFF image description
set Xmp.tiff.ImageDescription lang=de-DE TIFF Bildbeschreibung

# Register a namespace which Exiv2 doesn't know yet with a prefix.
reg ns myNamespace/

# Add a property in the new custom namespace.
set Xmp.ns.myProperty myValue

# There are no built-in Exiv2 value types for structures, qualifiers and
# nested types. However, these can be added by using an XmpText value and a
# path as the key.

# Add a structure
set Xmp.xmpDM.videoFrameSize/stDim:w    16
set Xmp.xmpDM.videoFrameSize/stDim:h    9
set Xmp.xmpDM.videoFrameSize/stDim:unit inch

# Add an element with a qualifier (using the namespace registered earlier)
set Xmp.dc.publisher James Bond
set Xmp.dc.publisher[1]/?ns:role secret agent

# Add a qualifer to an array element of Xmp.dc.creator (added above)
set Xmp.dc.creator[2]/?ns:role programmer

# Add an array of structures. First set a text property with just the 
# array type. (Note: this is not the same as creating an XmpBag property.)
set Xmp.xmpBJ.JobRef  XmpText type=Bag

# Then set the array items. Each of them is a structure with two elements.
set Xmp.xmpBJ.JobRef[1]/stJob:name   XmpText   Birthday party
set Xmp.xmpBJ.JobRef[1]/stJob:role   XmpText   Photographer

set Xmp.xmpBJ.JobRef[2]/stJob:name             Wedding ceremony
set Xmp.xmpBJ.JobRef[2]/stJob:role             Best man
