General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Use element with attributes in the CTM file, instead of just the element tag.

  • bjorn

    Use element with attributes in the CTM file, instead of just the element tag.

    Participants 0
    Replies 1
    Last Activity 8 years, 6 months ago

    Hi.

    I'm trying to assign bulletedlist and numberedlist to my template. But my problem is that I have DTD that uses attribute instead of element to decide if its a bulletedlist or a numberedlist being inserted.

    When I'm trying to modify the CTM file, I can't figure out how to assign one button to bulletedlist and one to numberedlist.

    Is it possible to point the buttons to attributes instead of element in the CTM file?

    The easiest way would be to change the DTD to use element instead and attributes, but I can't change the DTD at this point.

    I see the same problem with   (bold, underline, italic) buttons.

    I'm using XMetaL Author 8.0 – Enterprise.

    Thanks

    Regards
    Bjorn.

    Reply

    Derek Read

    Reply to: Use element with attributes in the CTM file, instead of just the element tag.

    The CTM settings that enable the functionality of these toolbar items require that each list have a different main element. This feature has no logic that will allow you to easily get it to do something with attributes.

    You will need to create macros that perform the insertion according to the specific markup required. I have no examples for scripts that would work for this type of markup and it could be quite tricky. APIs that would probably be of use would include:

    Selection.Surround()
    Selection.IsInsertionPoint
    Selection.InsertWithTemplate()

    I'm not sure that Selection.ToggleInline would be useful in this case as there are two elements that make up a list, the list element and the list item element.

    Reply

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

Lost Your Password?

Products
Downloads
Support