
CHAPTER 10: Scripting Access to XMP Metadata XMPScript object reference 275
registerAlias()
XMPMeta.registerAlias (aliasNS, aliasProp, actualNS, actualProp, arrayForm )
aliasNS
The alias namespace string. See “Schema namespace string constants” on
page 262.
aliasProp
The alias property, a simple name string.
actualNS
The namespace string of the aliased property. See “Schema namespace string
constants” on page 262.
actualProp
The aliased property, a simple name string.
arrayForm
Number. The array form for a simple alias to an array item, which controls how
the array is created if it is set for the first time through the alias. One of these
constants:
XMPConst.ALIAS_TO_SIMPLE_PROP (default) — A direct mapping. It can be
simple-to-simple, array-to-array, or structure-to-structure.
XMPConst.ALIAS_TO_ARRAY — The actual is an unordered array, the alias
is to the first element of the array.
XMPConst.ALIAS_TO_ORDERED_ARRAY — The actual is an ordered array,
the alias is to the first element of the array.
XMPConst.ALIAS_TO_ALT_ARRAY — The actual is an alternate array, the
alias is to the first element of the array.
XMPConst.ALIAS_TO_ALT_TEXT — The actual is an alternate-text array (a
localized property), the alias is to the
x-default element of the array.
Defines an alias mapping from one namespace and property to another. An alias can be a direct
mapping where the alias and actual property have the same data type, or it can map a simple alias
to an item in an array, either the first item, or the
x-default item in an alternate-text array.
Multiple alias names can map to the same actual property, as long as the forms match. If the same
alias and form exists, the call does nothing.
Returns
undefined.
registerNamespace()
XMPMeta.registerNamespace (namespaceURI, suggestedPrefix)
namespaceURI
The namespace URI string. See “Schema namespace string constants” on
page 262.
suggestedPrefix
The suggested namespace prefix string.
Registers a namespace with a prefix. If the suggested prefix is already in use, generates, registers,
and returns a different prefix.
Returns a String containing the actual registered prefix. This is the
suggestedPrefix, unless that
one is already assigned to another namespace.
Komentáře k této Příručce