Customizing for DITAMAP IEXML
PTC Arbortext Content Delivery supports only DITA format IEXML files out-of-the-box. This topic explains how to support the DITAMAP format IEXML files by applying customization.
The bundle contains IEXML files of the DITA and DITAMAP formats, which are internally mapped to other IEXML files. The following images show the conkeyref (highlighted in yellow) attribute which is internally mapped to the id (highlighted in green) attribute.
PTC Arbortext Content Delivery provides content support after the following sequence of flows is performed.
1. Transform the input data (bundles)—transforms the input data in a format that the repository supports for processing.
2. Loading of data (indexing with assets deployed)—loads the transformed data to the repository using the deployed assets and indexes the data being loaded.
3. Viewing of data—fetches the data to display it on UI, once the data is loaded.
To support DITAMAP format, add customization in the following layers.
Transformation layer
Assets layer
View Style sheet layer
Customizing Transformation Layer
IS transformation:
Need for Custom Code—IS2TOC_tr.xsl runs on the *DMPMap.xml file that provides IS hierarchy for navigating to the document. It fetches the data for transformation based on the attribute format, as shown in the following image.
Adding Custom Code—add custom code to IS2TOC_tr.xsl as shown in the following image, to support the DITAMAP IEXML files.
IEXML transformation:
Need for Custom Code—generateApplicableList.xsl runs on the *DMPMap.xml file that provides a list of IEXML files for transformation. It fetches the data for transformation based on the attribute format, as shown in the previous image.
Adding Custom Code—add custom code to generateApplicableList.xsl as shown in the following image to support DITAMAP IEXML.
Customizing Assets Layer
IEXML Type Definition:The structure or content of xml is modified and its contents are connected through some additional attributes or elements that must be linked. You must add new links while processing such data. Hence it is required to customize the type definition.
Need for AnchorGroup—To fetch the contents from source IEXML to target IEXML. The anchor links allow referencing data from source IEXML (the one which is rendered) to target IEXML (from where the data is fetched). It creates a link arc which automatically pulls the contents from target IEXML, when the source data is rendered. As shown in the previous image, AnchorGroup IEXML_SOURCE_CONKEYREF is referring to the source IEXML and IEXML_TARGET_CONKEYREF is referring to the target IEXML. The Xpath must be written to match the values for source and target xml files.
See the following example.
Map conkeyref value (Produktname) from source xml to target xml as shown in the following image:
Source xml has entry as shown in the previous image. You need a target xml from which the value of conkeyref attribute is to be fetched.
Here the target xml contains the value of the conkeyref as id (Produktname) attribute. You need an arc to fetch the mapping content from target xml to source xml.
Adding Custom Code—to view the data on the UI, the internal anchor links must be created after transform. To add the links IEXML.xml file is needed to be customized under LinkMappings element as shown in the following image:
In this example, one source and one target IEXML are shown.
If you have some DITAMAP xml that are required to map more references, you need to create more anchors.For example, if an IEXML has href value that refers to an xml, and in this xml again it has some href value, then multiple mappings are needed. Here, it has one source and one target. The target xml will behave as source and this target xml will have another target. In such case, you need to add more than one AnchorGroup as shown in the following image:
Global Type Definition:
Need for AnchorGroup—define AnchorGroup in globalDefinitions.xml to provide the reference for creating links. In the preceding example, IEXML_SOURCE_CONKEYREF creates a link to the IEXML_TARGET_CONKEYREF AnchorGroup.
Adding Custom Code—once the previously mentioned anchor groups are created, you need to mention them in the globalDefinitions.xml file under the AnchorGroup element as shown in the following image:
If you have series of mapping as mentioned previously for multiple anchor groups, then declare it in globalDefinitions.xml as shown in the following image:
Customizing View Style sheet Layer
To display the contents of the IEXML DITAMAP files, customize defaultExtView.xsl as shown in the following image.
The following image shows data with some additional elements. Here contentref is a new attribute that has data in another file, which is mapped with the href attribute. The file name with href value as mentioned in the following image has the actual data that is displayed on the UI.
The AnchorGroup created earlier refers href automatically and provides you the reference to handle it on View Style sheet. If the Source IEXML contains new elements, it must be handled in the View Style sheet as shown in the following image.
The IEXML is displayed on the PTC Arbortext Content Delivery UI as shown in the following two images. First image shows a one source and one target IEXML, while the next image shows one source and multiple target IEXMLs.