Documentation Center

IWriteMetadataAndBlobPlugin - BlobExtractMetadata

Copies the information found in the XML content (ExtractXPath parameter) towards the appropriate repository metadata fields (specified by the MetadataField and MetadataFieldLevel parameters).

Plugin Configuration

The following workset fields need to be configured:
Field NameField Level
The name of the field specified in the MetadataField parameterThe level of the field specified in the MetadataFieldLevel parameter
The following parameters can be configured:
ParameterRequiredDefault valueAllowed valuesDescription
ExtractXPathYes  XPath query syntax used to search and retrieve the information from within the supplied XML document
MetadataFieldYes Yes, NoThe metadata field which should be set by the information returned by the ExtractXPath query. Only string fields are support, number and date fields are not.
MetadataFieldLevelNolnglogical, version, lngThe metadata field level
MetadataUpperCaseNoNo, except when MetadataField=FISHLINKS and FISHIMAGELINKS then YesYes, NoConvert the retrieved value(s) into uppercase characters before storing them in the repository
DocumentUpperCaseNoNo, except when MetadataField=FISHLINKS and FISHIMAGELINKS then YesYes, NoConvert the retrieved value(s) into uppercase characters and update the XML document appropriately
SubstrBeforeWhenPresentNoYesYes, NoThis allows to only store the part of the retrieved value that is found before the given string in "SubstrBeforeWhenPresent". If the string is not found, the entire value is stored in metadata. E.g. when SubstrBeforeWhenPresent="#" and the value would be GUID-XYZ#BOOKMARK, only GUID-XYZ will be stored in metadata)
DuplicatesFoundNoIgnoreIgnore, Warn, RaiseDepending on the setting, an error will be thrown/raised or a warning will be logged when duplicate values are found in the content. If no error/warning should be reported, you can set the value to Ignore.
SkipEmptyValuesNoNoYes, NoIf you don't want to set the metadata property in case the ExtractXPath query doesn't return any value, set this parameter to Yes

plugin name="FIELDTOMETADATA" example

<plugin name="FIELDTOMETADATA" handler="BlobExtractMetadata" 
        ishcondition=="CurrentAction in ('Create', 'Update', 'Checkin') and (EDT='EDTXML')">
   <description>Find targets in document and put them on card</description>
   <workingset>
     <ishfields>
      <ishfield name="FISHTARGETS" level="lng"/>
     </ishfields>
   </workingset>
   <initialize>
     <parameters>
       <parameter name="ExtractXPath">
         //*[not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@id
       </parameter>
       <parameter name="MetadataField">FISHTARGETS</parameter>
       <parameter name="MetadataFieldLevel">lng</parameter>
       <parameter name="MetadataUpperCase">Yes</parameter>
       <parameter name="DocumentUpperCase">Yes</parameter>
       <parameter name="DuplicatesFound">Warn</parameter>    
     </parameters>
   </initialize>
  </plugin>

Plugin flow

The plugin will execute the defined ExtractXPath query to retrieve the value(s) to be stored in the metadata property.

If configured, the retrieved value(s) will be converted into uppercase in the document.

If configured, the retrieved value(s) will be converted into uppercase before storing them in the repository metadata property.

If configured, the plugin will check for duplicate values and report or ignore these cases.

If configured, the plugin will check the retrieved value(s) for actual content and skip the update/storing if no content was found.