Documentation Center

IPublishCombineLanguagesPlugin - IshPublishCombineLanguages

Generates the root map referencing the map of each language inside a configured language header topic (e.g. ISHPUBLMODULECOMBINELANGUAGES)

Plugin Input

The plugin has no specific parameters, but expects all necessary objects to be exported to the file system and to be present in the supplied ReportItems.

Plugin Outcome

The generated root map ISHCOMBINEDLANGUAGESROOT.ditamap is saved in the parent folder of the language directories.

Plugin flow

IshPublishCombineLanguages does the following:
  • The provided XmlResolver is used to resolve the DTD for a map using publicId '-//OASIS//DTD DITA Map//EN'
  • Then a map is created with a DOCTYPE for that DTD and for every language the following structure:
    • A topicref for the language header topic.
      • If the publish plugin configuration contains the CombineLanguageHeaderIshRef parameter, the file name of the configured topic is retrieved from the ReportItems and used in the href attribute.
      • If no CombineLanguageHeaderIshRef parameter is present, a dummy language header is generated by adding a topicref without href attribute but with a navtitle containing the label of the language. <topicref> <topicmeta> <navtitle>fr</navtitle> </topicmeta> </topicref>
    • Inside the topicref with the language header topic, a topicref referencing the map is added.

      The href attribute contains the file name of the RootDocumentObjectReportItem property on the ReportItems.

  • The created map is saved as ISHCOMBINEDLANGUAGESROOT.ditamap in the parent folder of the language directories

Example of the resulting map with CombineLanguageHeaderIshRef parameter

<?xml version="1.0" encoding="utf-16"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "file:///C:/ISH/WebSQL2016/Author/ASP/DocTypes/dita-oasis/1.2/technicalContent/dtd/map.dtd">
<map>
  <topicref href="fr/ISHPUBLMODULECOMBINELANGUAGES.xml">
    <topicref href="fr/GUID-C9CA7357-CBA3-43B3-A4B2-B977AD1B7D1E.ditamap" format="ditamap" />
  </topicref>
  <topicref href="en/ISHPUBLMODULECOMBINELANGUAGES.xml">
    <topicref href="en/GUID-C9CA7357-CBA3-43B3-A4B2-B977AD1B7D1E.ditamap" format="ditamap" />
  </topicref>
  <topicref href="nl/ISHPUBLMODULECOMBINELANGUAGES.xml">
    <topicref href="nl/GUID-C9CA7357-CBA3-43B3-A4B2-B977AD1B7D1E.ditamap" format="ditamap" />
  </topicref>
</map>

Example of the resulting map no CombineLanguageHeaderIshRef parameter configured

<?xml version="1.0" encoding="utf-16"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "file:///C:/ISH/WebSQL2016/Author/ASP/DocTypes/dita-oasis/1.2/technicalContent/dtd/map.dtd">
<map>
  <topicref>
    <topicmeta>
      <navtitle>fr</navtitle>
    </topicmeta>
    <topicref href="fr/GUID-C9CA7357-CBA3-43B3-A4B2-B977AD1B7D1E.ditamap" format="ditamap" />
  </topicref>
  <topicref>
    <topicmeta>
      <navtitle>en</navtitle>
    </topicmeta>
    <topicref href="en/GUID-C9CA7357-CBA3-43B3-A4B2-B977AD1B7D1E.ditamap" format="ditamap" />
  </topicref>
  <topicref>
    <topicmeta>
      <navtitle>nl</navtitle>
    </topicmeta>
    <topicref href="nl/GUID-C9CA7357-CBA3-43B3-A4B2-B977AD1B7D1E.ditamap" format="ditamap" />
  </topicref>
</map>