Pages: 1
Print
Author Topic: Conditional Text in 7.0  (Read 2396 times)
twisted
Member

Posts: 15


« on: April 16, 2012, 01:55:06 PM »

In 6.0 SP1 I have been able to exclude a topic from a PDF by applying a condition to the whole topic, like at the concept tag product="XYZ500". When I generate the PDF and that condition is not selected, the topic is not include in the output of the PDF.

In 7.0 the first time through if I don't select the condition I get the PDF to generate without the topic. If I then select the condition I get a PDF that does include the topic. If I then turn the condition off again and then generate another PDF the topic keeps showing up.

It appears that files are staying persistent in the DITA_OT\Temp folder: \Application Data\SoftQuad\XMetaL Shared\DITA_OT\temp

To get around this I’m deleting the contents in this folder.

It seems like I'm having issues with persistent files, is there some setting I missing?

XMetaL 7.0.0.103
« Last Edit: April 16, 2012, 04:09:03 PM by twisted » Logged
gcrews
Member

Posts: 265


« Reply #1 on: April 16, 2012, 04:31:13 PM »

Did you check the build log? Maybe there is a build error the third time and the PDF or files are not getting updated?

You may also want to look at this thread I started on the dita users group:
http://tech.groups.yahoo.com/group/dita-users/message/23156
       “But note also that making root topic elements conditional is very bad practice--the references to those topics should be conditional, not the topics themselves”
« Last Edit: April 16, 2012, 06:49:35 PM by gcrews » Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #2 on: April 17, 2012, 04:59:18 PM »

Problem with the temp folder not being cleaned up is due to missing code in build_init.xml

The DITA OT supports a parameter called "clean.temp" (http://dita-ot.sourceforge.net/1.5.3/quickstartguide/reference/dita-ot_ant_properties.html) and in our case it is exposed as ANT_PARAM_clean.temp  =  yes

The default value is supposed to be yes, but it has no effect because build_init.xml is missing some code.

The fix is as follows.

1. Edit the following file using a good text editor C:\Program Files\Common Files\XMetaL Shared\DITA_OT\build_init.xml

2. Find this line:
<target name="start-process" description="Processing started"/>

3. Replace it with the following:

  <target name="start-process" description="Processing started">
    <condition property="clean-temp.skip">
      <and>
        <isset property="clean.temp"></isset>
        <equals arg1="${clean.temp}" arg2="no" casesensitive="false"></equals>
      </and>
    </condition>
    <antcall target="clean-temp"></antcall>
  </target>


After editing this copy of the DITA OT you will need to deploy it:

1. Launch XMetaL Author Enterprise.
2. Select Tools > Configure Output to open the Configure Output Options dialog.
3. On the Advanced tab find this parameter and change the value from 1 to 2:
    cmd_dita_ot_per_user_version = 1
4. Click OK to dismiss the Configure Output Options dialog.
5. Either generate output or select Tools > Configure Output again.
6. When asked if you would like to upgrade the DITA-OT version select OK. The DITA OT will be re-deployed from the installed version that you modified in C:\Program Files\Common Files\XMetaL Shared\DITA_OT
Logged
Pages: 1
Print
Jump to: