diff --git a/samples/xmpsample.cpp b/samples/xmpsample.cpp index 1b53ca98..b2e79eb4 100644 --- a/samples/xmpsample.cpp +++ b/samples/xmpsample.cpp @@ -176,6 +176,11 @@ try { tv.read("Best man"); xmpData.add(Exiv2::XmpKey("Xmp.xmpBJ.JobRef[2]/stJob:role"), &tv); + // Add a creator contact info structure + xmpData["Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCity"] = "Kuala Lumpur"; + xmpData["Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCtry"] = "Malaysia"; + xmpData["Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiUrlWork"] = "http://www.exiv2.org"; + // ------------------------------------------------------------------------- // Output XMP properties for (Exiv2::XmpData::const_iterator md = xmpData.begin(); diff --git a/test/data/xmpparser-test.out b/test/data/xmpparser-test.out index 43d2faba..6c781a38 100644 --- a/test/data/xmpparser-test.out +++ b/test/data/xmpparser-test.out @@ -305,6 +305,9 @@ Xmp.xmpBJ.JobRef[1]/stJob:name XmpText 14 Birthday party Xmp.xmpBJ.JobRef[1]/stJob:role XmpText 12 Photographer Xmp.xmpBJ.JobRef[2]/stJob:name XmpText 16 Wedding ceremony Xmp.xmpBJ.JobRef[2]/stJob:role XmpText 8 Best man +Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCity XmpText 12 Kuala Lumpur +Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCtry XmpText 8 Malaysia +Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiUrlWork XmpText 20 http://www.exiv2.org @@ -316,6 +319,7 @@ Xmp.xmpBJ.JobRef[2]/stJob:role XmpText 8 Best man xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#" xmlns:xmpBJ="http://ns.adobe.com/xap/1.0/bj/" xmlns:stJob="http://ns.adobe.com/xap/1.0/sType/Job#" + xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" dc:source="xmpsample.cpp" dc:one="-1" dc:two="3.1415" @@ -382,6 +386,10 @@ Xmp.xmpBJ.JobRef[2]/stJob:role XmpText 8 Best man stJob:role="Best man"/> +