Platforms to show: All Mac Windows Linux Cross-Platform
Back to XMPMetaMBS class.
XMPMetaMBS.ComposeArrayItemPath(schemaNS as string, arrayName as string, itemIndex as Integer) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| schemaNS | The namespace URI for the array. Must not be null or the empty string. |
| arrayName | The name of the array. May be a general path expression, must not be an empty string. |
| itemIndex | The index of the desired item. Arrays in XMP are indexed from 1. The constant kXMP_ArrayLastItem always refers to the last existing array item. |
Some examples using this method:
XMPMetaMBS.ComposeFieldSelector(schemaNS as string, arrayName as string, fieldNS as string, fieldName as string, fieldValue as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The path syntax allows two forms of "content addressing" that may be used to select an item in an array of alternatives. The form used in ComposeFieldSelector lets you select an item in an array of structs based on the value of one of the fields in the structs. The other form of content addressing is shown in ComposeLangSelector.
For example, consider a simple struct that has two fields, the name of a city and the URI of an FTP site in that city. Use this to create an array of download alternatives. You can show the user a popup built from the values of the city fields. You can then get the corresponding URI as follows:
path=ComposeFieldSelector ( schemaNS, "Downloads", fieldNS, "City", chosenCity)
exists = GetStructField ( schemaNS, path, fieldNS, "URI", uri )
| schemaNS | The namespace URI for the array. Must not be null or the empty string. |
| arrayName | The name of the array. May be a general path expression, must not be an empty string. |
| fieldNS | The namespace URI for the field used as the selector. Must not be an empty string. |
| fieldName | The name of the field used as the selector. Must be a simple XML name, must not be an empty string. It must be the name of a field that is itself simple. |
| fieldValue | The desired value of the field. |
Some examples using this method:
XMPMetaMBS.ComposeLangSelector(schemaNS as string, arrayName as string, langName as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The path syntax allows two forms of "content addressing" that may be used to select an item in an array of alternatives. The form used in ComposeLangSelector lets you select an item in an alt-text array based on the value of its <tt>xml:lang</tt> qualifier. The other form of content addressing is shown in ComposeFieldSelector.
ComposeLangSelector does not supplant SetLocalizedText or GetLocalizedText.
They should generally be used, as they provide extra logic to choose the appropriate language and maintain consistency with the 'x-default' value. ComposeLangSelector gives you an path expression that is explicitly and only for the language given in the langName parameter.
| schemaNS | The namespace URI for the array. Must not be null or the empty string. |
| arrayName | The name of the array. May be a general path expression, must not be an empty string. |
| langName | The RFC 3066 code for the desired language. |
Some examples using this method:
XMPMetaMBS.ComposeQualifierPath(schemaNS as string, structName as string, qualNS as string, qualName as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
schemaNS The namespace URI for the property to which the qualifier is attached. Must not be an empty string.
propName The name of the property to which the qualifier is attached. May be a general path expression, must not be an empty string.
qualNS The namespace URI for the qualifier. May be an empty string if the qualifier is in the XML empty namespace.
qualName The name of the qualifier. Must be a simple XML name, must not be an empty string.
Returns the composed path. This will be of the form <tt>ns:propName/?qNS:qualName</tt>, where "ns" is the prefix for schemaNS and "qNS" is the prefix for qualNS.
Some examples using this method:
XMPMetaMBS.ComposeStructFieldPath(schemaNS as string, structName as string, fieldNS as string, fieldName as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| schemaNS | The namespace URI for the struct. Must not be null or the empty string. |
| structName | The name of the struct. May be a general path expression, must not be an empty string. |
| fieldNS | The namespace URI for the field. Must not be an empty string. |
| fieldName | The name of the field. Must be a simple XML name, must not be an empty string. |
Some examples using this method:
XMPMetaMBS.ConvertFromBool(value as boolean) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Some examples using this method:
XMPMetaMBS.ConvertFromDate(value as XMPDateTimeMBS) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Some examples using this method:
XMPMetaMBS.ConvertFromFloat(value as Double, format as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
format: Optional C sprintf format for the conversion. Defaults to "%f".
Some examples using this method:
XMPMetaMBS.ConvertFromInt(value as Integer, format as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
format: Optional C sprintf format for the conversion. Defaults to "%d".
Some examples using this method:
XMPMetaMBS.ConvertFromInt64(value as Int64, format as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
format: Optional C sprintf format for the conversion. Defaults to "%d".
XMPMetaMBS.ConvertToBool(value as string) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Some examples using this method:
XMPMetaMBS.ConvertToDate(value as string) as XMPDateTimeMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Some examples using this method:
XMPMetaMBS.ConvertToFloat(value as string) as Double
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Some examples using this method:
XMPMetaMBS.ConvertToInt(value as string) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Some examples using this method:
XMPMetaMBS.ConvertToInt64(value as string) as Int64
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
XMPMetaMBS.CurrentDateTime as XMPDateTimeMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | XMP | MBS XMP Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns nil on any error.
The items on this page are in the following plugins: MBS XMP Plugin.