Méthode | Description | |
---|---|---|
ComposeArrayItemPath ( string arrayName, int itemIndex ) : string |
Compose the path expression for an item in an array.
|
|
ComposeFieldSelector ( string arrayName, string fieldNs, string fieldName, string fieldValue ) : string |
Compose the path expression to select an alternate item by a field's value. 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:
String path = composeFieldSelector ( schemaNs, "Downloads", fieldNs, "City", chosenCity ); XMPProperty prop = xmpObj.getStructField ( schemaNs, path, fieldNs, "URI" );
|
|
ComposeLangSelector ( string arrayName, string langName ) : string |
Compose the path expression to select an alternate item by language. 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 xml:lang qualifier. The other form of content addressing is shown in ComposeFieldSelector. \note 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.
|
|
ComposeQualifierPath ( string qualNs, string qualName ) : string |
Compose the path expression for a qualifier.
|
|
ComposeStructFieldPath ( string fieldNs, string fieldName ) : string |
Compose the path expression for a field in a struct. The result can be added to the path of
|
Méthode | Description | |
---|---|---|
AssertFieldName ( string fieldName ) : void |
ParameterAsserts that a struct field name is set.
|
|
AssertFieldNs ( string fieldNs ) : void |
ParameterAsserts that a struct field namespace is set.
|
|
AssertQualName ( string qualName ) : void |
ParameterAsserts that a qualifier name is set.
|
|
AssertQualNs ( string qualNs ) : void |
ParameterAsserts that a qualifier namespace is set.
|
public static ComposeArrayItemPath ( string arrayName, int itemIndex ) : string | ||
arrayName | string | The name of the array. May be a general path expression, must not be
/// null or the empty string. |
itemIndex | int | The index of the desired item. Arrays in XMP are indexed from 1.
/// 0 and below means last array item and renders as [last()] .
/// |
Résultat | string |
public static ComposeFieldSelector ( string arrayName, string fieldNs, string fieldName, string fieldValue ) : string | ||
arrayName | string | The name of the array. May be a general path expression, must not be
/// null or the empty string. |
fieldNs | string | The namespace URI for the field used as the selector. Must not be
/// null or the empty string. |
fieldName | string | The name of the field used as the selector. Must be a simple XML name, must
/// not be null or the empty string. It must be the name of a field that is
/// itself simple. |
fieldValue | string | The desired value of the field. |
Résultat | string |
public static ComposeLangSelector ( string arrayName, string langName ) : string | ||
arrayName | string |
/// The name of the array. May be a general path expression, must
/// not be null or the empty string. |
langName | string | /// The RFC 3066 code for the desired language. |
Résultat | string |
public static ComposeQualifierPath ( string qualNs, string qualName ) : string | ||
qualNs | string | The namespace URI for the qualifier. May be null or the empty
/// string if the qualifier is in the XML empty namespace. |
qualName | string | The name of the qualifier. Must be a simple XML name, must not be
/// null or the empty string. |
Résultat | string |
public static ComposeStructFieldPath ( string fieldNs, string fieldName ) : string | ||
fieldNs | string | The namespace URI for the field. Must not be null or the empty
/// string. |
fieldName | string | The name of the field. Must be a simple XML name, must not be
/// null or the empty string. |
Résultat | string |