DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion DITA Map template, with pre-inserted dita files

  • MFerris

    DITA Map template, with pre-inserted dita files

    Participants 1
    Replies 2
    Last Activity 7 years, 10 months ago

    I want to create a template for a dita map which will also include a regular dita file and possible a nested map as well. The issue is, we want to have a .ditamap file which has multiple nested .ditamaps which are chapters. And then inside those .ditamap chapters, have .dita section files. To give you some context, it is an Instruction Manual with Chapters that each have sections, and sub sections.

    Is it possible to create some sort of template to create and include an example nested chapter map and example .dita section file?

    So in essence, the hierarchy would be something like:

                                ____ Chapter1.ditamap —– Section1.dita
                                |                                  |___ Section2.dita         
    Project.ditamap —|
                                |____Chapter2.ditamap —- Section1.dita

    Excuse the crude diagram, but I hope this explains what I mean :). Any suggestions to an alternative document structure would also be appreciated.


    Derek Read

    Reply to: DITA Map template, with pre-inserted dita files

    I think what you are asking for is a way to create a number of different files with a single click? There is no feature built into the software that will do this. The closest is the “templates” feature, but templates consist of single files in XMetaL Author. You can get most of the way there though. You can certainly create a template for each of your files and include as much content in them as is needed to begin working on that individual file.

    Basically, what you see in File > New (dialog box) is defined by the files and folders inside the /Template subfolder of your XMetaL Author installation.

    If what you describe is something you need to do on a regular basis then I would suggest this:

    1. Create an empty folder anywhere on your machine or in your regular storage space (network drive for example). This folder and everything it contains will be your “template”.
    2. Create all your maps and the files each of them reference inside that folder, in subfolders if necessary. This can include as many files as you need. All the links between them will be set, but they won't contain any real content (unless that content needs to appear in everything you create).
    3. Remove all the @id attributes from all the files. This will allow XMetaL Author Enterprise's “auto-id” feature to set the @id value for elements (see Help topic “DITA Options” and the section “Auto-assign element IDs”).
    4. Each time you need to use this “template” copy the entire folder, give it a new name / location in your storage, then open each file in XMetaL Author Enterprise and add your content.

    If a CMS is involved then a specific feature that does this might exist in the CMS itself, or it might be possible to create something like it. Consult with the vendor for specific information.



    Reply to: DITA Map template, with pre-inserted dita files

    That kind of solution seems to be what we're looking for. I'll give it a test run and perhaps set the file permissions to Read-only so the users can't overwrite the templates in that folder. Thanks a lot Derek 🙂


  • You must be logged in to reply to this topic.

Lost Your Password?