How can I import a DITA XML file into CCMS such that it is added as a topic?

I need to add a large number of topics to CCMS. Rather than doing that manually, I am using a script to create files that have the same XML structure as the topic in CCMS. The only difference between the files and the CCMS topic, other than content, is that the elements in the files do not have GUIDs. I am assuming that in the process of importing the files into CCMS, SDL LiveContent Architect Publication Manager or the tool that is used to import the file adds the GUIDs. I am using SDL LiveContent Architect Publication Manager 11.1.2.

Parents Reply Children
  • I haven't seen that error before but maybe someone else on the community has. I will venture a guess. In the folder with your GUID-ized content, there should be a file named filemap.xml. Search that file for this topic and look at the metadata. It looks like it is complaining about the topic type. Does this topic type match the topic types you have defined in LCA? Is the topic valid XML?

    You can modify the filemap.xml and rerun the job and it will only process the topics that failed to import. Click the Skip conversion option to do this.
  • Dear all,

    Huntley is indeed on the correct route to resolve the issue. My take is that your CCMS has the Topic Type property defined as a mandatory property. Hence you need to supply a value for it during the import stage. This is also the reason why this error does not come up on environments which have this property defined as optional.

    You can supply this value indeed as Huntley suggested through the filemap.xml which is available in the folder with your GUID-ized content.

    You should check the ishfields structure for your topics to see whether there is a structure as shown below present

    <ishfield name="FMODULETYPE" level="logical">Any value applicable in your CCMS from you list of values</ishfield>

    If not you have to add this to each and any of the ishfields structures defined for the topics. You can easily find them by looking at the ISHType attribute on the ishobject element surrounding the ishfields element. The topics are marked as ISHModule. So search for all ishobject tags having the ISHType attribute set to ISHModule and add or correct the ishfield tag as shown above in the bolded section.

    It might be that you have other properties defined as mandatory as well and need to supply them in a similar approach in order to provide the correct value(s) for them.

    I hope this helps,

    Kind Regards,

    Raf

  • Dear Raf and Huntley,

    Thank you for your replies. I searched the .3sish files that I found in a directory that XMetal uses to store local versions of topics, but didn't find an ishfield entry for "Topic type". Not sure what to do. Let me provide more details about what I am trying to do. I need to document hundreds of commands. One option is to manually create the topics for the commands in Publication Manager and then check out the topics and add the content. This approach works, but it is time-consuming.  A better option for me is to use a script to extract the information about the commands (syntax, description, ...) from the specs and automatically create the command topics. To do so, I opened a sample command topic in XMetal and used the topic's XML content to create the following template that I can use to automatically create new XML files. The template does not include the ids and the script that I created to generate new command topics does not generate GUIDs. One thing to mention here is that DITA2Trisoft complained about the ids not being there for the reference and title elements, so I ended up adding two dummy ids to get DITA2Trisfot to accept the file.

    My script populates the template and spits out an XML file for every command. The challenge now is importing the XML files into Publication Manager. I know that the template works because if I check out a command topic, switch to Plain Text View, replace the content of the topic with the template's content, and check in the topic, the check-in operation completes without a problem, even though the template didn't have any GUIDs defined. When I check out the topic again and switch to Plain Text View, I can see that GUIDs were added by Publication Manager where needed, as shown here.

    However, when using DITA2Trisoft to import a file generated by my script, the import operation fails with the error shown in an earlier post. I looked at the following .3sish file for the topic created from the template, but I didn't see an ishfield element for Topic type.

    The following is what is contained in the filemap.xml. 

    Not sure where to go from here

    Best regards.

  • Dear Persimmon,

    The .3sish files are files used by the authoring bridge and they do not contain all of the properties which are assigned to the object in the CCMS.

    I would suggest the following steps with respect to the process you described above and which should resolve your issue.

    1/ Check through the webclient or the property dialog windows of either Publication Manager/Authoring Bridge which properties are marked mandatory for topics.

    You can easily identify them by the * which is available after the label of the field or by trying to upload one of the topics (or a dummy topic) through the webclient while you provide as little information as needed. The dialogs (first for the logical level, second the version level and last the language level dialog) will error on missing mandatory properties.

    My guess is that the 'Topic Type' property is marked as mandatory.

    Do choose one value from the drop down which you will apply in the filename for each and every topic available.

    2/ Just before you start the 'Import' step of the DITA2Trisoft application, you need to extend the filemap.xml file with the property for the 'Topic Type' property with the choose value from step 1.

    eg. <ishfield name="FMODULETYPE" level="logical">Your choosen value</ishfield>

    So each object should have an structure similar to the one shown below:

    3/ After you have added all the missing mandatory properties for you object (you can leave out the status and language as these are automatically added), you can import the content into the CCMS.

    I hope this helps.

    Kind Regards,

    Raf

  • Tried looking for the name of the Topic type property, I could not find it. I found the "DocumentObj - System Fields" section in the SDL online documentation, but could not find a field for topic type. Will try again tomorrow.
  • Dear Persimmon,

    The name of the Topic Type property is FMODULETYPE. This is the internal name used within the CCMS.
    Within the dialogs, the label could be 'Content Type' as well, depending on the customized configuration in which labels can be changed as well.
    So please have a look at the dialogs for the Content Type property and then supply the xml snippet highlighted in the other replies to your filemap.xml

    Kind Regards,

    Raf
  • Dear Raf,

    Many thanks! It worked!

    I did add the following entry, but initially, it didn't work. DITA2Trisoft overwrote the file. Later, I added the line again and it worked.

    <ishfield name="FMODULETYPE" level="logical" xml:space="preserve">Reference</ishfield>
  • Dear Raf,

    I searched the DITA2Trisoft, the SDL LiveContent 2014 website, and the web for examples or information on how to "run an XSL transformation against the filemap.xml file" so that the FMODULETYPE files is present in the filemap.xml file instead of having to manually add an FMODULETYPE entry for every .xml file to import, but I could not. 

    Note: I found a topic about the sample DITA2Trisoft.xsl file. I customized a copy of the file to add the FMODULETYPE field. It worked. I can now import files with out having to manually add FMODULETYPE entries. Many thanks for your help.

    This is what the DITA2Trisoft documentation says about the filemap.xml file.

    Overview of the filemap.xml file

    By default, this file contains the following type of information for each object:
    • Original file name and the new GUID assigned to it
    • Folder where the content will be created in SDL LiveContent Architect
    • SDL LiveContent Architect information type: map, topic, or image
    • Language of the object
    • Version of the object
    • Title of the object
    If you want to specify additional metadata, you can run an XSL transformation against the filemap.xml file.
  • Your installation directory for DITA2Trisoft contains a file named DITA2Trisoft.xsl. This is an example XSL tranformation file. You can make a copy and modify it to suit your needs. The DITA2Trisoft application includes a Post conversion XSL field where you can specify the location of your XSL file.