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
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
| IshFieldDitaDeliveryConnectorMapping | Yes | Xml structure | Xml structure mapping the field with the connector used by Dynamic Delivery |
Input expected in the
context.Items collection
| Item Key | Required | Default value | Item Value Type | Description |
|---|---|---|---|---|
| TransportPackageRootDirectory | Yes | string | The root transport package folder (typically ...\Data\Publish\Data\[RANDOMFOLDERNAME]\work\TP). | |
| ExtendedOverallPackageObjectFilePath | Yes | string | File 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:
isconceptwith value "yes"connectornamespaceidwith 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
pageschema file using the __packages.xml - Try to find each
ishfieldname.ishfieldlevel.elementand add the extra properties:isconceptwith the fixed value "yes"connectornamespaceidwith the value from the connectorNamespaceId
- If the JSON
pageschema file is changed, the modified file is saved to the file system