Pages: 1
Print
Author Topic: Modifying Insert Element Behavior  (Read 5369 times)
kmartin7
Member

Posts: 8


« on: October 09, 2009, 07:24:42 AM »

XMetal Author Enterpise 5.5 DITA: I want to modify the behavior on some elements in the "Insert Element" pane. Right now, whenever someone selects "fig", it automatically puts a "p" element, which subsequently must be removed, then a title and image element must be manually added. How can I change the behavior so that when the fig element is clicked on, it inserts only a fig/title|image?
Logged
Su-Laine Yeo
Solutions Consultant
Member

Posts: 260


« Reply #1 on: October 14, 2009, 03:04:59 PM »

Hi,

I haven't been able to reproduce this problem using the default configuration of XMetaL 5.5.

For most Insert Element operations, you can configure what sub-elements are inserted by default. To do this, edit the .CTM file associated with the particular document types. For example, for DITA concept topics the .CTM file is called concept_ditabase.ctm and is located in C:\Program Files\XMetaL 5.5\Author\DITA\XACs\concept .

The default .CTM file for DITA topic types contains the following code:

Code:
<Template>
      <Name ns="">fig</Name>
      <MiniTemplate><![CDATA[<fig><title><?xm-replace_text Figure Title?></title><image placement="break" align="center"></image></fig>]]></MiniTemplate>
    </Template>

Using XMetaL Developer to edit CTM files is a bit easier than editing them in a text editor. If you change your concept_ditabase.ctm file to make it look more like the above and then restart XMetaL, the next time you insert a <fig> into a DITA concept topic you should get a <title> element, an <image> element, and no <p> element.

Each DITA topic type is controlled by a different CTM file, so you will probably want to make your changes in all the CTM files here: C:\Program Files\XMetaL 6.0\Author\DITA\XACs

If you just want a clean set of the CTM files that are installed by default, you could do  a complete uninstall-reinstall (http://forums.xmetal.com/index.php/topic,67.0.html). Or if you're on product maintenance, feel free to contact XMetaL Support and we can send you the files.

Cheers,
Su-Laine
Logged

Su-Laine Yeo
Solutions Consultant
JustSystems Canada, Inc.
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #2 on: October 15, 2009, 03:34:37 AM »

The original description of this issue sounds a little strange, and is unexpected behaviour (as Su-Laine suggests). If the installation is OK, then we'd like to have specific steps to reproduce it. It is also possible that the product is acting as expected, but we just don't quite understand the results, or the steps to reproduce it.

What does the document contain before the <fig> is inserted?
Where exactly is the fig being inserted?
What does it look like afterwards?
Logged
kmartin7
Member

Posts: 8


« Reply #3 on: October 15, 2009, 06:40:23 AM »

I have attached the template we are using. It is within a reference topic, contained within a <section> element, usually the preceding-sibling is a <p> element.

I have examined the CTM files for both concept and reference, and both have the following structure for fig:

<Template>
      <Name ns="">fig</Name>
      <MiniTemplate><![CDATA[<fig><title><?xm-replace_text Figure Title?></title><image width="800px" height="600px" placement="break"></image></fig>]]></MiniTemplate>
    </Template>

I did test a patch that was provided to me that was a beta fix for displaying conref'd table rows back in the Summer of this year, if that helps.

Thanks.

* Software-Reference.zip (0.45 KB - downloaded 488 times.)
Logged
Su-Laine Yeo
Solutions Consultant
Member

Posts: 260


« Reply #4 on: October 20, 2009, 11:53:04 AM »

Hi,

The problem is probably with the doctype declaration in your template. It's different from the doctype declaration in the default template, and that is causing the system to use a different CTM file than the one you want it to use. It may also be that a lot of DITA functionality is also not working properly. Usually if the system can't find the right CTM file, it's also not able to find other configuration files that are needed for an optimal editing environment.

I recommend submitting a Support request via http://na.justsystems.com/contact-support.php , as we'll have to look at more of your files in order to suggest a specific solution. You can just copy the URL for this forum thread into the description of the support request.

Best wishes,
Su-Laine

Logged

Su-Laine Yeo
Solutions Consultant
JustSystems Canada, Inc.
Pages: 1
Print
Jump to: