Documentation Center

IPublishPostProcessPlugin - DitaDeliveryExtendSchemaWithMetadataBinding

Adds extra properties for the configured fields to the page schema file, to indicate that this field is linked with a taxonomy system and which connector can be used by Dynamic Delivery to retrieve the labels.

Plugin Input

Plugin configuration parameters
ParameterRequiredDefault valueAllowed valuesDescription
IshFieldDitaDeliveryConnectorMappingYesXml structure
<mappings>
<add ishfieldname="..." 
     ishfieldlevel= "..." 
     connectorNamespaceId="..."/>
</mappings>
Xml structure mapping the field with the connector used by Dynamic Delivery
Input expected in the context.Items collection
Item KeyRequiredDefault valueItem Value TypeDescription
TransportPackageRootDirectoryYesstringThe root transport package folder (typically ...\Data\Publish\Data\[RANDOMFOLDERNAME]\work\TP).
ExtendedOverallPackageObjectFilePathYesstringFile path of the XML that contains an overview of all the files that need to be transported to Dynamic Delivery (typically full file path to __packages.xml).

Changes made to the file system:

The JSON page schema files are extended for the configured fields with the extra properties:
  • isconcept with value "yes"
  • connectornamespaceid with the value from the mapping xml structure.

Values set in the context as a result: None.

Values set in the context.Items collection as a result: None.

plugin name="ISHDITADELIVERYEXTENDSCHEMAWITHMETADATABINDING" example

<plugindefinition name="ISHDITADELIVERYEXTENDSCHEMAWITHMETADATABINDING" handler="DitaDeliveryExtendSchemaWithMetadataBinding">
   <description>Indicate to the fields in the schema files(e.g.page_meta) with which connector they are linked to a taxonomy system</description>
   <initialize>
      <parameters>
        <parameter name="IshFieldDitaDeliveryConnectorMapping">
          <mappings>
            <add ishfieldname="FPPCONCEPTS1" ishfieldlevel="logical" connectorNamespaceId="pparty1"/>
            <add ishfieldname="FPPCONCEPTS2" ishfieldlevel="logical" connectorNamespaceId="pparty2"/>
          </mappings>
        </parameter>
      </parameters> 
   </initialize>
 </plugindefinition>

Example of an extended page schema file


{
  "page_meta": {
    "properties": {
      "ishlogicalref.object.id": {
        "type": "integer",
        "searchable": "no"
      },
      ...
      "FTITLE.logical.value": {
        "type": "string",
        "searchable": "no"
      },
      ...
      "FPPCONCEPTS1.logical.element": {
        "type": "array",
        "items": {
           "type": "string"
        },
        "searchable": "no",
        "isconcept": "yes",
        "connectornamespaceid": "pparty1"
      },
      "FPPCONCEPTS2.logical.value": {
        "type": "array",
        "items": {
           "type": "string"
        },
        "searchable": "no"
      }
    }
  }
}
     

Plugin flow

DitaDeliveryExtendSchemaWithMetadataBinding does the following:
  • Load the JSON page schema file using the __packages.xml
  • Try to find each ishfieldname.ishfieldlevel.element and add the extra properties:
    • isconcept with the fixed value "yes"
    • connectornamespaceid with the value from the connectorNamespaceId
  • If the JSON page schema file is changed, the modified file is saved to the file system