Disabled XMP SDK standard aliases.

v0.27.3
Andreas Huggel 18 years ago
parent b2d16d343f
commit a4fe28cef7

@ -89,6 +89,7 @@ namespace Exiv2 {
ErrMsg( 44, N_("Failed to determine property name from path %1, namespace %2")), // %1=property path, %2=namespace
ErrMsg( 45, N_("Schema namespace %1 is not registered with the XMP Toolkit")), // %1=namespace
ErrMsg( 46, N_("No namespace registered for prefix `%1'")), // %1=prefix
ErrMsg( 47, N_("Aliases are not supported. Please send this XMP packet to ahuggel@gmx.net `%1', `%2', `%3'")), // %1=namespace, %2=property path, %3=value
// Last error message (message is not used)
ErrMsg( -2, N_("(Unknown Error)"))

@ -413,7 +413,7 @@ namespace Exiv2 {
printNode(schemaNs, propPath, propValue, opt);
#endif
if (XMP_PropIsAlias(opt)) {
// Todo: What should we do with these? Skip for now
throw Error(47, schemaNs, propPath, propValue);
continue;
}
if (XMP_NodeIsSchema(opt)) {
@ -422,7 +422,7 @@ namespace Exiv2 {
if (XmpProperties::prefix(schemaNs).empty()) {
std::string prefix;
bool ret = meta.GetNamespacePrefix(schemaNs.c_str(), &prefix);
if (!ret) throw Exiv2::Error(45, schemaNs);
if (!ret) throw Error(45, schemaNs);
prefix = prefix.substr(0, prefix.size() - 1);
XmpProperties::registerNs(schemaNs, prefix);
}

@ -24,7 +24,7 @@ try {
// -------------------------------------------------------------------------
// Any properties can be set provided the namespace is known. Values of any
// type can be assigned to an Xmpdatum (requires an output operator). The
// type can be assigned to an Xmpdatum, if they have an output operator. The
// default XMP value type for unknown properties is a simple text value.
xmpData["Xmp.dc.one"] = -1;
@ -33,6 +33,8 @@ try {
xmpData["Xmp.dc.four"] = uint16_t(255);
xmpData["Xmp.dc.five"] = int32_t(256);
xmpData["Xmp.dc.six"] = false;
// In addition, there is a dedicated assignment operator for Exiv2::Value
Exiv2::XmpTextValue val("Seven");
xmpData["Xmp.dc.seven"] = val;
@ -58,6 +60,13 @@ try {
v->read("Hello, World"); // qualifier
xmpData.add(Exiv2::XmpKey("Xmp.dc.description"), v.get());
// According to the XMP specification, Xmp.tiff.ImageDescription is an
// alias for Xmp.dc.description. Exiv2 treats an alias just like any
// other property and leaves it to the application to implement specific
// behaviour if desired.
xmpData["Xmp.tiff.ImageDescription"] = "TIFF image description";
xmpData["Xmp.tiff.ImageDescription"] = "lang=de-DE TIFF Bildbeschreibung";
// -------------------------------------------------------------------------
// Register a namespace which Exiv2 doesn't know yet. This is only needed
// when properties are added manually. If the XMP metadata is read from an

@ -31,7 +31,7 @@ Xmp.exif.NativeDigest XmpText 414 36864,40960,40961,37
2c2
< <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1.2-113">
---
> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1">
> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core (Exiv2) 4.1.1">
35d34
< <rdf:li xml:lang="en-US">Blue Square Test File - .jpg</rdf:li>
37a37
@ -100,7 +100,7 @@ Xmp.wine.Recommend XmpText 5 False
2c2
< <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1.2-113">
---
> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1">
> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core (Exiv2) 4.1.1">
4c4
< <rdf:Description rdf:about="uuid:0f410644-9396-11d9-bb8e-a67e6693b6e9"
---
@ -214,7 +214,7 @@ Xmp.ns1.NestedStructProp/ns2:Outer/ns2:Middle/ns2:Inner/ns2:Field2 XmpText 12
< </rdf:RDF>
---
> <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1">
> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core (Exiv2) 4.1.1">
> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
> <rdf:Description rdf:about=""
> xmlns:ns1="ns:test1/"
@ -292,6 +292,7 @@ Xmp.dc.seven XmpText 5 Seven
Xmp.dc.format XmpText 10 image/jpeg
Xmp.dc.creator XmpSeq 3 1) The first creator, 2) The second creator, 3) And another one
Xmp.dc.description LangAlt 2 lang="de-DE" Hallo, Welt, lang="x-default" Hello, World
Xmp.tiff.ImageDescription LangAlt 2 lang="de-DE" TIFF Bildbeschreibung, lang="x-default" TIFF image description
Xmp.xmpDM.videoFrameSize/stDim:w XmpText 2 16
Xmp.xmpDM.videoFrameSize/stDim:h XmpText 1 9
Xmp.xmpDM.videoFrameSize/stDim:unit XmpText 4 inch
@ -304,11 +305,12 @@ 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
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1">
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core (Exiv2) 4.1.1">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ns="myNamespace/"
xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
xmlns:xmpDM="http://ns.adobe.com/xmp/1.0/DynamicMedia/"
xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
xmlns:xapBJ="http://ns.adobe.com/xap/1.0/bj/"
@ -353,6 +355,12 @@ Xmp.xmpBJ.JobRef[2]/stJob:role XmpText 8 Best man
<rdf:value>James Bond</rdf:value>
<ns:role>secret agent</ns:role>
</dc:publisher>
<tiff:ImageDescription>
<rdf:Alt>
<rdf:li xml:lang="x-default">TIFF image description</rdf:li>
<rdf:li xml:lang="de-DE">TIFF Bildbeschreibung</rdf:li>
</rdf:Alt>
</tiff:ImageDescription>
<xmpDM:videoFrameSize
stDim:w="16"
stDim:h="9"

@ -552,8 +552,9 @@ XMPMeta::Initialize()
(void) RegisterNamespace ( "adobe:ns:meta/", "x", &voidPtr, &voidLen );
(void) RegisterNamespace ( "http://ns.adobe.com/iX/1.0/", "iX", &voidPtr, &voidLen );
XMPMeta::RegisterStandardAliases ( "" );
// 06-Oct-07, ahu: Do not use aliases. They result in unexpected behaviour.
// XMPMeta::RegisterStandardAliases ( "" );
// Initialize the other core classes.

Loading…
Cancel
Save