General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › Treat as type
-
periardy October 8, 2010 at 2:18 pm
Treat as type
October 8, 2010 at 2:18 pmParticipants 1Replies 2Last Activity 12 years, 5 months agoHi,
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
Derek Read October 8, 2010 at 5:51 pm
Reply to: Treat as type
October 8, 2010 at 5:51 pmIt 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.
LeeHart October 24, 2010 at 9:54 pm
Reply to: Treat as type
October 24, 2010 at 9:54 pmShort 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:
auto_snippet
]]>
Or you could use OnInsertElement to do it with code
auto_snippet
JScript
');
]]>
Lee
-
AuthorPosts
- You must be logged in to reply to this topic.