General XMetaL Discussion

  • periardy

    Treat as type

    Participants 1
    Replies 2
    Last Activity 11 years, 8 months ago

    Hi,

    we are looking at adding the treat as type property to the ctm file without using the customization file editor. Is this possible? What are the attributes that we need to add and to what elements.

    thanks

    Reply

    Derek Read

    Reply to: Treat as type

    It is possible but if you don't use XMetaL Developer for this then you kind of need to figure out the settings based on other information as we have not officially documented how to do this. It should be possible to do it given the following information:

    The CTM file is an XML file.

    All of the demos we include (Journalist, DocBook, Meeting Minutes) include a CTM file, as do all customizations (it is a mandatory file that will be autogenerated if not present) so you can have a look at those.

    The Customization Guide includes information on the CTM file, though it is written assuming you will use XMetaL Developer to create and modify it.

    You may find information in an outdated document called “[url=http://na.justsystems.com/tutorials/customizing_xmetal_manually.html]Customizing XMetaL Manually[/url]”. This is not part of our official documentation but it does include some information on the Treat As property.

    XMetaL Author includes a DTD for the CTM file if you want to validate it (but it does not include a customization for editing it). You can simply open the CTM file in XMetaL Author to do that.

    Reply

    LeeHart

    Reply to: Treat as type

    Short of using Treat as Type, can't you use the or to do something similar?

    For example this Template will insert a snippet when auto_snippet is selected:
       

    Or you could use OnInsertElement to do it with code
     
        auto_snippet
        JScript
        ');
    ]]>

     

    Lee

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support