DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Stylesheets for PDF output for specialized elements

  • txvia

    Stylesheets for PDF output for specialized elements

    Participants 0
    Replies 1
    Last Activity 11 years, 4 months ago

    Hi, I've successfully created a specialized domain, an ent and a mod file for a couple of specialized elements, and was able to integrate them to the existing topic domain so that these elements can be used along with other existing elements such as codeblcok, codeph, etc. To create a custom style for two particular elements, in this case and , by modeling them after with the exception that the new elements' background color is red (#ff0000). I created an xsl file called “api-domain-attr.xsl” and placed it in C:Program Files (x86)Common FilesXMetaL SharedDITA-OTdemoxmfoCustomizationfoattrsxm-cfg and added an entry “” in xm_baseline_attrs.xsl. In “api-domain-attr.xsl,” I copied codeblock's style and pasted it twice to this file, and manually renamed the element to and respectively. I then changed the background color to #ff0000. Then I tried to generate a PDF output by doing Ctrl+g in XMetaL -> Configure Output -> Advanced -> change the value of “cmd_dita_ot_per_user_version” from “1” to “2” so that the custom files are deployed to my user account (C:Users%username%…..). Then a PDF file was generated, but the background color was the same as codeblock (grey). I kind of noticed that was styled the same way as automatically, is that the way it's supposed to be? Anyway, any help I get is much appreciated.

    Am I modifying the right files in the right directory?

    I am attaching a zip file with my customized stylesheets for your reference, thanks!


    Derek Read

    Reply to: Stylesheets for PDF output for specialized elements

    You can put an into the XSLT and see if it shows up in the output log. This will let you know if the file is being loaded, and if the particular template is being called. Following is a good tutorial on this subject:


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

Lost Your Password?