Home Forums General XMetaL Discussion Count Macro Reply To: Count Macro

Derek Read

Reply to: Count Macro

The only thing I can think of is that perhaps you have not specified the element name using the right text casing. With no SGML declaration file XMetaL defaults to all capitals for element names, so your script must also assume all capitals. It is easy to check this by simply looking at the name of the element you are trying to find in TagsOn view. If it appears as then you need to search for “coc”, if it appears as then search for “COC”, or you might have so search for “Coc”.

I've tested this and it works for SGML for both regular and empty elements so that isn't the issue. In your case it might be as simple as using this instead:

//XMetaL Script Language JScript:
Selection.MoveToElement(“COC”);

Reply

Products
Downloads
Support