Pages: 1
Print
Author Topic: Stylesheets for PDF output for specialized elements  (Read 2275 times)
txvia
Member

Posts: 44


« on: October 05, 2011, 03:42:18 PM »

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 <apicomp> and <apielem>, by modeling them after <codeblock> 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 Files\XMetaL Shared\DITA-OT\demo\xmfo\Customization\fo\attrs\xm-cfg\ and added an entry "<xsl:import href="xm-cfg/api-domain-attr.xsl"/>" 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 <apicomp> and <apielem> 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 <apicomp> was styled the same way as <codeblock> 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!

* PDF_stylesheets.zip (24.56 KB - downloaded 219 times.)
« Last Edit: October 05, 2011, 03:59:59 PM by txvia » Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #1 on: October 06, 2011, 10:45:17 AM »

You can put an <xsl:message> 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:
http://www.ibm.com/developerworks/xml/library/x-tipxslmsg/index.html
Logged
Pages: 1
Print
Jump to: