
CHAPTER 10: Scripting Access to XMP Metadata XMPScript object reference 289
catenateArrayItems()
XMPUtils.catenateArrayItems(xmpObj, schemaNS, arrayName, separator, quotes, options)
xmpObj
The XMPMeta object containing the array.
schemaNS
The namespace URI string. See “Schema namespace string constants” on
page 262.
arrayName
The array property name string. Can be a general path expression. Each item in
the array must be a simple string value.
separator
The string used to separate the items in the result string. Default is '; ', an ASCII
semicolon and space (U+003B,U+0020).
quotes
The character used to quote items that contain a separator. Default is '"', an ASCII
double quote (U+0022).
options
Option flag that controls the concatenation. This constant value:
XMPConst.SEPARATE_ALLOW_COMMAS — Allow commas in item values (such
as "LastName, FirstName"). This option must be set the same way in this
function and in separateArrayItems()
to reconstruct the items correctly.
Default is 0.
Concatenates a set of array item values into a single string. The resulting string can be separated
back out into array items using separateArrayItems()
.
Returns the concatenated String.
composeArrayItemPath()
XMPUtils.composeArrayItemPath(schemaNS, arrayName, itemIndex)
schemaNS
The namespace URI string. See “Schema namespace string constants” on
page 262.
arrayName
The array property name string. Can be a general path expression.
itemIndex
Number. The 1-based position index of the item. Use
XMPConst.ARRAY_LAST_ITEM to reference the last existing item in the array. In
this case, the resulting path is
ns:arrayName[last()].
Creates and returns a string containing the path expression for an item in an array, using the
registered prefix for the namespace, in the form:
schemaNS:arrayName[itemIndex]
Returns a String.
composeFieldSelector()
XMPUtils.composeFieldSelector(schemaNS, arrayName, fieldNS, fieldName, fieldValue)
schemaNS
The namespace URI string. See “Schema namespace string constants” on
page 262.
arrayName
The array property name string. Can be a general path expression.
Comentários a estes Manuais