Pages: 1
Print
Author Topic: <stepresult> on same line as <cmd> in PDF Transform?  (Read 225 times)
palmer@dst
Member

Posts: 35


« on: August 02, 2011, 08:10:20 AM »

Is there a quick XSL edit to get the <stepresult> to appear on the same line as the <cmd> in the PDF transform? None of the "keep with" properties added to the commons-attr.xsl for the <stepresult> seem to do anything.

Thanks,

RP
Logged

rpalmer
DST Systems, Inc.
severin.foreman
Member

Posts: 29



« Reply #1 on: August 02, 2011, 12:21:40 PM »

Override this template in xsl\fo\task-elements.xsl to remove the fo:block. That should do it.

 <xsl:template match="*[contains(@class, ' task/stepresult ')]">
        <fo:block xsl:use-attribute-sets="stepresult" id="{@id}">
            <xsl:apply-templates/>
        </fo:block>
  </xsl:template>

Best regards,
Severin Foreman
Logged
palmer@dst
Member

Posts: 35


« Reply #2 on: August 02, 2011, 01:05:55 PM »

I don't have an task-elements.xsl in any of my DITA OT directories, but I did find that template in the commons.xsl (DITA_OT\demo\xmfo\xsl\fo) (and also in DITA_OT\demo\fo\xsl\fo) and commented it out in both locations, but the stepresult block still appears as a new paragraph after the cmd block.
Logged

rpalmer
DST Systems, Inc.
palmer@dst
Member

Posts: 35


« Reply #3 on: August 15, 2011, 09:56:45 AM »

Figured it out - the fix is in the demo\xmfo\xsl\fo\commons.xsl file, not the task-elements.xsl file. In the commons.xsl file, for the
 
Code:
<xsl:template match="*[contains(@class, ' task/stepresult ')]">
     <fo:block xsl:use-attribute-sets="stepresult" id="{@id}" >
         <xsl:apply-templates/>
     </fo:block>
    </xsl:template>

change "block" to "inline" in both instances.

   
Code:
<xsl:template match="*[contains(@class, ' task/stepresult ')]">
       <fo:inline xsl:use-attribute-sets="stepresult" id="{@id}" >
           <xsl:apply-templates/>
        </fo:inline>
    </xsl:template>

This will keep the <stepresult> on the same line as the preceding element (which may or may not be the <cmd>, but that's not always what the <stepresult> follows, so this is a better fix).

RP
Logged

rpalmer
DST Systems, Inc.
Pages: 1
Print
Jump to:  

email us