summaryrefslogtreecommitdiff
path: root/source/XMPCore/XMPMeta-Serialize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/XMPCore/XMPMeta-Serialize.cpp')
-rw-r--r--source/XMPCore/XMPMeta-Serialize.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/source/XMPCore/XMPMeta-Serialize.cpp b/source/XMPCore/XMPMeta-Serialize.cpp
index 73c0d2b..0aa75ae 100644
--- a/source/XMPCore/XMPMeta-Serialize.cpp
+++ b/source/XMPCore/XMPMeta-Serialize.cpp
@@ -1,5 +1,5 @@
// =================================================================================================
-// Copyright 2002-2007 Adobe Systems Incorporated
+// Copyright 2002-2008 Adobe Systems Incorporated
// All Rights Reserved.
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@@ -43,9 +43,6 @@ using namespace std;
static const char * kPacketHeader = "<?xpacket begin=\"\xEF\xBB\xBF\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>";
static const char * kPacketTrailer = "<?xpacket end=\"w\"?>"; // ! The w/r is at [size-4].
-static const char * kPXMP_PacketStart = "<pxmp:XMP_Packet";
-static const char * kPXMP_PacketEnd = "</pxmp:XMP_Packet>";
-
static const char * kPXMP_SchemaGroup = "XMP_SchemaGroup";
static const char * kRDF_XMPMetaStart = "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"";
@@ -1106,10 +1103,12 @@ SerializeAsRDF ( const XMPMeta & xmpObj,
}
// Write the xmpmeta element's start tag.
- for ( level = baseIndent; level > 0; --level ) headStr += indentStr;
- headStr += kRDF_XMPMetaStart;
- headStr += kXMPCore_VersionMessage "\">";
- headStr += newline;
+ if ( ! (options & kXMP_OmitXMPMetaElement) ) {
+ for ( level = baseIndent; level > 0; --level ) headStr += indentStr;
+ headStr += kRDF_XMPMetaStart;
+ headStr += kXMPCore_VersionMessage "\">";
+ headStr += newline;
+ }
// Write the rdf:RDF start tag.
for ( level = baseIndent+1; level > 0; --level ) headStr += indentStr;
@@ -1141,9 +1140,11 @@ SerializeAsRDF ( const XMPMeta & xmpObj,
headStr += newline;
// Write the xmpmeta end tag.
- for ( level = baseIndent; level > 0; --level ) headStr += indentStr;
- headStr += kRDF_XMPMetaEnd;
- headStr += newline;
+ if ( ! (options & kXMP_OmitXMPMetaElement) ) {
+ for ( level = baseIndent; level > 0; --level ) headStr += indentStr;
+ headStr += kRDF_XMPMetaEnd;
+ headStr += newline;
+ }
// Write the packet trailer PI into the tail string as UTF-8.
tailStr.erase();