Problems with DITA customization

HeatherW
Posts: 8

Problems with DITA customization

Fri Jul 13, 2012 9:28 am

Hi Radu,

I'm trying to add some customizations to my PDF transform, but when I add them to the Customization folder they don't appear in the output. When I hack the OT and add them directly to the files they publish fine. Can you let me know where I'm going wrong?

I'm using Mac OS X 10.7.4 if that makes a difference.

I want to remove the italics on hyperlinks. I've commented out the following code in /demo/fo/cfg/fo/attrs/commons-attr.xsl and the italics are removed when I publish to PDF:

<xsl:attribute-set name="common.link">
<xsl:attribute name="color">blue</xsl:attribute>
<!-- removing italics for links -->
<!-- <xsl:attribute name="font-style">italic</xsl:attribute> -->
</xsl:attribute-set>

Now I try and add this customization to the Customization folder:
1. Copy the Customization folder to /Users/heather/Documents/WorkingFolder_SVN
2. Copy commons-attr.xsl to the following folder location:
/Users/heather/Documents/WorkingFolder_SVN/Customization/fo/attrs
3. Rename the file commons-attr-custom.xsl and make the change above to remove italics from hyperlinks.
4. In /Users/heather/Documents/WorkingFolder_SVN/Customization, rename catalog.xml.orig to catalog.xml
5. In catalog.xml, uncomment <uri name="cfg:fo/attrs/custom.xsl" uri="fo/attrs/custom.xsl"/>
6. In /Users/heather/Documents/WorkingFolder_SVN/Customization/fo/attr, rename custom.xml.orig to custom.xml
7. Change custom.xml so it reads:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:import href="commons-attr-custom.xsl"/>
</xsl:stylesheet>
8. In the DITA Map PDF scenario, change the customization.dir parameter to /Users/heather/Documents/WorkingFolder_SVN/Customization
9. Publish... hyperlinks are still in italics.

Where am I going wrong? I've followed all the steps in your previous post here: post18642.html?hilit=customization%20dir#p18642

Thanks
Heather
Radu
Posts: 5825

Re: Problems with DITA customization

Fri Jul 13, 2012 1:50 pm

Hi Heather,

In steps (6) and (7) you were actually referring to the custom.xsl.orig and custom.xsl, right?

These steps worked for me but with one other modification, instead of commenting the line:

Code: Select all

<xsl:attribute name="font-style">italic</xsl:attribute>


replace it with:

Code: Select all

<xsl:attribute name="font-style">normal</xsl:attribute>


It seems that if the line is commented out, somehow the font-style is set to italic from somewhere else, I did not have the time to find out from where.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
HeatherW
Posts: 8

Re: Problems with DITA customization

Mon Jul 16, 2012 3:01 am

Thanks Radu, it's publishing correctly now.

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 0 guests