Pages: 1
Print
Author Topic: Modifying HTML Help Output  (Read 3077 times)
super-structure
Member

Posts: 6


« on: December 06, 2010, 12:42:11 PM »

I'm attempting to modify the HTML Help output generated in XMetal Author v5.5 by editing some of the XSL templates found in the C:\Project Files\Common Files\XMetaL Shared\DITA_OT\xsl\ folder.

For starters, I'm simply trying to remove the items involved with formatting a one-step task as a paragraph (not trying to justify having a single item, numbered list; just trying to start simple). So I made a copy of \xslhtml\taskdisplay.xsl and then just deleted or removed the items dealing with the "onestep" mode. For example:

Code:
<xsl:template match="*[contains(@class,' task/steps ')]" mode="steps-fmt">
 <xsl:param name="step_expand"/>
  <xsl:variable name="flagrules">
    <xsl:call-template name="getrules"/>
  </xsl:variable>
  <xsl:variable name="conflictexist">
    <xsl:call-template name="conflict-check">
      <xsl:with-param name="flagrules" select="$flagrules"/>
    </xsl:call-template>
  </xsl:variable>
  <xsl:call-template name="gen-style">
    <xsl:with-param name="conflictexist" select="$conflictexist"></xsl:with-param>
    <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
  </xsl:call-template>
<!-- Remove 'choose/ when/ otherwise' section for one step option -->
<!-- <xsl:choose>
  <xsl:when test="*[contains(@class,' task/step ')][2]"> -->
   <xsl:call-template name="setaname"/>
   <ol>
    <xsl:call-template name="commonattributes"/>
     <xsl:call-template name="gen-style">
       <xsl:with-param name="conflictexist" select="$conflictexist"></xsl:with-param>
       <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
     </xsl:call-template>
    <xsl:call-template name="setid"/>
    <xsl:apply-templates mode="steps">
     <xsl:with-param name="step_expand" select="$step_expand"/>
    </xsl:apply-templates>
   </ol><xsl:value-of select="$newline"/>
 <!-- </xsl:when>
  <xsl:otherwise> <!-- One step --
    <xsl:apply-templates mode="onestep">
     <xsl:with-param name="step_expand" select="$step_expand"/> <!-- pass the value to subsequent templates --
    </xsl:apply-templates>
  </xsl:otherwise>
 </xsl:choose> -->
</xsl:template>

...

<xsl:template match="*[contains(@class,' task/steps ')]" mode="steps-fmt">
 <xsl:param name="step_expand"/>
  <xsl:variable name="flagrules">
    <xsl:call-template name="getrules"/>
  </xsl:variable>
  <xsl:variable name="conflictexist">
    <xsl:call-template name="conflict-check">
      <xsl:with-param name="flagrules" select="$flagrules"/>
    </xsl:call-template>
  </xsl:variable>
  <xsl:call-template name="gen-style">
    <xsl:with-param name="conflictexist" select="$conflictexist"></xsl:with-param>
    <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
  </xsl:call-template>
<!-- Remove 'choose/ when/ otherwise' section for one step option -->
<!-- <xsl:choose>
  <xsl:when test="*[contains(@class,' task/step ')][2]"> -->
   <xsl:call-template name="setaname"/>
   <ol>
    <xsl:call-template name="commonattributes"/>
     <xsl:call-template name="gen-style">
       <xsl:with-param name="conflictexist" select="$conflictexist"></xsl:with-param>
       <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
     </xsl:call-template>
    <xsl:call-template name="setid"/>
    <xsl:apply-templates mode="steps">
     <xsl:with-param name="step_expand" select="$step_expand"/>
    </xsl:apply-templates>
   </ol><xsl:value-of select="$newline"/>
 <!-- </xsl:when>
  <xsl:otherwise> <!-- One step --
    <xsl:apply-templates mode="onestep">
     <xsl:with-param name="step_expand" select="$step_expand"/> <!-- pass the value to subsequent templates --
    </xsl:apply-templates>
  </xsl:otherwise>
 </xsl:choose> -->
</xsl:template>

This appeared to have no effect on the output.

Next, per this forum post, I added output parameter ANT_PARAM_args.htmlhelp.skipCompilation  =  yes to the HTML Help deliverable type (seems like an odd parameter to add, but that doesn't mean it's wrong, per se).

Even if I did this wrong (which is actually pretty likely), I would assume to get a warning or error from XMetaL and - more to the point - for the output to be affected in some way. However, it appears to have no effect on the output whatsoever.

Similarly, I also attempted to modify the map2hhp.xsl file to simply include some additional text in the output HHP file, and that also did not work.

Is there some other copy of these files which I should be editing? Is there a different output parameter that should be used in order for XMetaL to use the templates in the XMetal Shared folder? Thanks for any help anyone provide.
Logged

Jason Coleman
Sr. Technical Writer
Bentley Systems
severin.foreman
Member

Posts: 47



« Reply #1 on: December 06, 2010, 12:46:48 PM »

You have to make the changes in the copy of the DITA OT that XMetaL writes to your user account folder. If you are on Windows XP, that would be C:\Documents and Settings\<user>\Application Data\SoftQuad\XMetaL Shared\DITA_OT. Then you should start seeing the effects of your changes.

Best regards,
Severin Foreman
Epicor Software
Logged
super-structure
Member

Posts: 6


« Reply #2 on: December 06, 2010, 01:38:28 PM »

Thanks, severin. That certainly was the issue! Now, onto breaking XSL templates... ;)

I am on Windows 7, so it is located in C:\Users\<user.name>\AppData\Roaming\SoftQuad\XMetal Shared\..., where AppData is a hidden folder (I think Application Data is a hidden folder in Windows XP, as well). It seems that searching Windows 7 for a file won't (by default, at least) display anything contained in a hidden folder, even when hidden folders are made visible.

I should have guess it was something like that as we often have the same issue with our own software products.
Logged

Jason Coleman
Sr. Technical Writer
Bentley Systems
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #3 on: December 06, 2010, 01:54:37 PM »

To find the folder on any machine (regardless of Windows version, group policy settings your IT dept has configured, or your Windows account name) you can use this path in Windows Explorer:

%appdata%\SoftQuad\XMetaL Shared\DITA_OT
Logged
Pages: 1
Print
Jump to:  

email us