XmpPathFactory
XmpPathFactory Public class
Diagram
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph iTextSharp.xmp
iTextSharp.xmp.XmpPathFactory[[XmpPathFactory]]
end
Members
Methods
Public Static methods
Returns | Name |
---|---|
string | ComposeArrayItemPath (string arrayName, int itemIndex)Compose the path expression for an item in an array. |
string | ComposeFieldSelector (string arrayName, string fieldNs, string fieldName, string fieldValue) |
string | ComposeLangSelector (string arrayName, string langName)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. |
string | ComposeQualifierPath (string qualNs, string qualName)Compose the path expression for a qualifier. |
string | ComposeStructFieldPath (string fieldNs, string fieldName)Compose the path expression for a field in a struct. The result can be added to the path of |
Details
Methods
ComposeArrayItemPath
public static string ComposeArrayItemPath(string arrayName, int itemIndex)
Arguments
Type | Name | Description |
---|---|---|
string | arrayName | The name of the array. May be a general path expression, must not be ... |
int | itemIndex | The index of the desired item. Arrays in XMP are indexed from 1. 0 and below means last array item and renders as ... |
Summary
Compose the path expression for an item in an array.
Returns
Returns the composed path basing on fullPath. This will be of the form ns:arrayName[i] , where "ns" is the prefix for schemaNs and "i" is the decimal representation of itemIndex.
Exceptions
Name | Description |
---|---|
XmpException | Throws exeption if index zero is used. |
ComposeStructFieldPath
public static string ComposeStructFieldPath(string fieldNs, string fieldName)
Arguments
Type | Name | Description |
---|---|---|
string | fieldNs | The namespace URI for the field. Must not be ... |
string | fieldName | The name of the field. Must be a simple XML name, must not be ... |
Summary
Compose the path expression for a field in a struct. The result can be added to the path of
Returns
Returns the composed path. This will be of the form ns:structName/fNS:fieldName , where "ns" is the prefix for schemaNs and "fNS" is the prefix for fieldNs.
Exceptions
Name | Description |
---|---|
XmpException | Thrown if the path to create is not valid. |
ComposeQualifierPath
public static string ComposeQualifierPath(string qualNs, string qualName)
Arguments
Type | Name | Description |
---|---|---|
string | qualNs | The namespace URI for the qualifier. May be ... |
string | qualName | The name of the qualifier. Must be a simple XML name, must not be ... |
Summary
Compose the path expression for a qualifier.
Returns
Returns the composed path. This will be of the form ns:propName/?qNS:qualName , where "ns" is the prefix for schemaNs and "qNS" is the prefix for qualNs.
Exceptions
Name | Description |
---|---|
XmpException | Thrown if the path to create is not valid. |
ComposeLangSelector
public static string ComposeLangSelector(string arrayName, string langName)
Arguments
Type | Name | Description |
---|---|---|
string | arrayName | The name of the array. May be a general path expression, must not be ... |
string | langName | The RFC 3066 code for the desired language. |
Summary
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.
Returns
Returns the composed path. This will be of the form ns:arrayName[@xml:lang='langName'] , where "ns" is the prefix for schemaNs.
ComposeFieldSelector
public static string ComposeFieldSelector(string arrayName, string fieldNs, string fieldName, string fieldValue)
Arguments
Type | Name | Description |
---|---|---|
string | arrayName | |
string | fieldNs | |
string | fieldName | |
string | fieldValue |
Generated with ModularDoc