Specifications
• When the entry point in which the dataset was created returns.
Setting leaf values
The set functions described below set the value of a leaf property. They succeed if:
• The specified property exists and it is a leaf property: the property value is updated.
• The specified property does not exist, but its immediate parent does exist and it is a struct:
the property is created with the specified name and its value is set.
• The specified property does not exist, but its immediate parent does exist and it is an array:
the property is created with the specified index and its value is set; any missing array items
(that is, siblings of the property with a lower index) are created as well and set to an empty
string value.
Sets the value of the leaf property at the specified
XMP location path to the specified string. Returns
true if successful, false otherwise.
setString( xmp-path : String, prefix-map
: Map, value : String ) : Boolean
Same as setString but produces a decimal
representation of the number; “precision” indicates
setNumber( xmp-path : String,
prefix-map : Map, value : Number,
precision : Number ) : Boolean
the number of digits after the decimal point; if
precision is zero the representation has no decimal
point (that is, this is suitable for an integer number).
Same as setString but produces the string “True” or
“False” depending the Boolean value.
setBoolean( xmp-path : String,
prefix-map : Map, value : Boolean ) :
Boolean
Same as setString but produces a date-time
representation in the ISO 8601 format. The class of
setDate( xmp-path : String, prefix-map
: Map, value : Date ) : Boolean
the Date object is specific to the scripting
environment in use.
Note:
To set the value of a child property, first verify that its parent exists, and if not, create the parent
with the set functions described in the following section. It may be necessary to apply this process
recursively to create the parent’s parent.
Note:
To set the value of an item in an alt-text array, use the setLocalizedText() function described
later. The above set functions do no allow a language selector in the specified XMP location path.
Setting localized text
Modifies the value of a selected item in an alt-text array. Creates an
appropriate array item if necessary, and handles special cases for the
x-default item.
setLocalizedText(
xmp-path : String,
prefix-map : Map,
value : String,
If the selected item is from a match with the specific language, the
value of that item is modified. If the existing value of that item matches
genericLang : String,
specificLang: String ) :
Boolean
the existing value of the x-default item, the x-default item is also
484
Enfocus Switch 10










