An advanced feature is the use of the XML attribute strategy on the top level metadata field for example Title
, Description
, Authors
, RightsOwner
.
We have three possible values for the attribute
KEEP
: Don't overwrite the old value for this field if it was not emptyOVERWRITE
:- Overwrite the old value for this field
- This is the default strategy for simple fields which are fields that contain a textual value such as
Title
andDescription
.
MERGE
:- Only applicable to complex fields which are fields that contain sub fields, such as
Authors
,Keywords
andCategories
. - Merge the new sub fields with the existing sub fields
- This is the default strategy for complex fields
- Only applicable to complex fields which are fields that contain sub fields, such as
Examples
Sidecar XML
<?xml version="1.0" encoding="UTF-8"?> <MediaHAVEN_external_metadata> <title strategy="OVERWRITE">Big Buck Bunny, Sunflower version</title> <description strategy="KEEP">The best movie ever!</description> <MDProperties> <Authors type="list" strategy="MERGE"> <auteur>Blender Foundation 2008</auteur> </Authors> <RightsOwner type="KEEP">SoundHandler</RightsOwner> </MDProperties> </MediaHAVEN_external_metadata>
Existing Metadata
<?xml version="1.0" encoding="UTF-8"?> <MediaHAVEN_external_metadata> <title>Big Buck Bunny</title> <MDProperties> <Authors type="list"> <auteur>Janus Bager Kristensen 2013</auteur> </Authors> <RightsOwner>Janus Kristensen</RightsOwner> </MDProperties> </MediaHAVEN_external_metadata>
Resulting Metadata
<?xml version="1.0" encoding="UTF-8"?> <MediaHAVEN_external_metadata> <title>Big Buck Bunny, Sunflower version</title> <description>The best movie ever!</description> <MDProperties> <Authors type="list"> <auteur>Blender Foundation 2008</auteur> <auteur>Janus Bager Kristensen 2013</auteur> </Authors> <RightsOwner>Janus Kristensen</RightsOwner> </MDProperties> </MediaHAVEN_external_metadata>