Skip to main content
Skip table of contents

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
ReturnsName
stringComposeArrayItemPath(string arrayName, int itemIndex)
Compose the path expression for an item in an array.
stringComposeFieldSelector(string arrayName, string fieldNs, string fieldName, string fieldValue)
stringComposeLangSelector(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.
stringComposeQualifierPath(string qualNs, string qualName)
Compose the path expression for a qualifier.
stringComposeStructFieldPath(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

Source code

public static string ComposeArrayItemPath(string arrayName, int itemIndex)
Arguments
TypeNameDescription
stringarrayNameThe name of the array. May be a general path expression, must not be ...
intitemIndexThe 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
NameDescription
XmpExceptionThrows exeption if index zero is used.
ComposeStructFieldPath

Source code

public static string ComposeStructFieldPath(string fieldNs, string fieldName)
Arguments
TypeNameDescription
stringfieldNsThe namespace URI for the field. Must not be ...
stringfieldNameThe 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
NameDescription
XmpExceptionThrown if the path to create is not valid.
ComposeQualifierPath

Source code

public static string ComposeQualifierPath(string qualNs, string qualName)
Arguments
TypeNameDescription
stringqualNsThe namespace URI for the qualifier. May be ...
stringqualNameThe 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
NameDescription
XmpExceptionThrown if the path to create is not valid.
ComposeLangSelector

Source code

public static string ComposeLangSelector(string arrayName, string langName)
Arguments
TypeNameDescription
stringarrayNameThe name of the array. May be a general path expression, must
not be ...
stringlangNameThe 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

Source code

public static string ComposeFieldSelector(string arrayName, string fieldNs, string fieldName, string fieldValue)
Arguments
TypeNameDescription
stringarrayName
stringfieldNs
stringfieldName
stringfieldValue

Generated with ModularDoc

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.