DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Problem using phrases back to back

  • Steven Jong

    Problem using phrases back to back

    Participants 2
    Replies 3
    Last Activity 11 years, 3 months ago

    We are using XMetaL Author Enterprise 6.0.1.

    I wanted to use a Phrase tag (inline element) to mark several phrases with otherprops values so that only one would appear at a time. I have done this in the previous version of XMetaL that my company used. Since we upgraded to V6, I find that I cannot do this any more; instead, XMetaL is joining the phrases together.

    For example: I have this sentence:

        My favorite colors are red, blue, and green.

    I want to conditionalize the words “red,” “blue,” and “green.” (Not good structure, I know, but it's only an example.)

    (1) I select the string ” red,” and enclose it in a Phrase inline element, and attach an otherprops attribute of CableMode. Looking at the sentence in Normal view, I see:

        My favorite colors are~ red,~ blue, and green.

    (2) Now, I select the string ” blue,” and enclose it in another Phrase inline element. I expect to see this:
        My favorite colors are~ red,~~ blue,~ and green.

    Instead, I see this:

        My favorite colors are~ red, blue,~ and green.

    XMetaL has joined the two phrases for me, which is not what I want. How does it know I don't want to give each phrase different attributes?

    I can see how this would be useful to prevent unnecessarily breaking strings that are all flagged the same way, but in my case I want the phrases back to back. Is this concatenation a configurable behavior that can be turned on and off? Is this intended behavior, or a bug?


    Derek Read

    Reply to: Problem using phrases back to back

    I can't seem to reproduce this. Can you provide exact detailed steps?
    This area of the product has not changed (at least on purpose) so I suspect it must be some specific step you are doing that is triggering this behaviour. The product does have (and always has had) the ability to merge elements when it makes sense to do so, but for reusable components it should not be doing that. Elements are generally only merged together when you ask the product to do that (usually by using the backspace key) but you cannot do that for reusable components, so I'm not sure what is occurring for you.

    In my case the steps are:
    1. create a new topic, give it a title and save it
    2. inside a

    add the text: My favorite colors are red, blue, and green.
    3. select the text “red,”
    4. from the Reuse menu select “Create Reusable Component” provide a filename and save it
    5. select the text “blue,”
    6. from the Reuse menu select “Create Reusable Component” provide a filename and save it

    In my case it does not matter if I do this in Tags On or Normal view. Sometimes there are subtle differences between the two because you can make slightly different selections in Tags On view, but in this case we are just dealing with text so I think there should be no difference.


    Steven Jong

    Reply to: Problem using phrases back to back

    Thanks for looking into this and promptly responding! I'm sure you're doing what I want to do in a better way than I'm doing it, but you are not following the steps I gave.

    I am not using the Reuse menu, I am selecting a text string, right-clicking, and selecting Inline Element; from the pop-up menu that appears, I am selecting the element Phrase. Also, I am selecting contiguous text strings, so that the phrases are touching; you are not selecting the spaces between the words, so you are not selecting contiguous strings.

    The software is behaving as if it's decided that since I am trying to create two tagged phrases touching each other, I must want to create one longer one. In this case, no, I don't…

    — Steve


    Derek Read

    Reply to: Problem using phrases back to back

    I incorrectly assumed you were using these for reuse, not conditionalizing (I missed where you said you were setting @otherprops and somehow read that as @conref I guess). My bad.

    The only way I can get what you are seeing to occur is to:

    1. Wrap “red,” in a so that I have this:

    red, blue, green.

    2. Then instead of selecting “blue,” and wrapping it in I must include the space before the word blue. This makes the selection immediately adjacent to the red,

    In that case the second is in fact merged into the first. The dialog has logic in it that makes an assumption that if you insert two phrase-level elements of the same type one immediately following the other (using this dialog) that it should merge them. I think it is a tough call as to what the “correct” behaviour should be (without prompting you, which would probably be annoying).

    We keep track of how many people complain about these types of things and so far I have nothing listed in our support channel (so +1 if you really think this is the preferred logic for you, but please elaborate on the other elements in the dialog. I think we'd want to do the same for all of them otherwise it would probably be pretty confusing if it merged two elements but didn't do that for two elements.

    There are ways to get what you need:
    1. Don't include the space in your selection of “blue,”. This may or may not be what you want.
    2. Don't include the space in your selection of “blue,”. Then if you need the space inside the , rather than outside, add it afterwards.
    3. Use the Element List to insert the element instead of this dialog. The dialog has this additional logic. The Element List pretty much just inserts exactly what you tell it to insert (except for special cases like image where it helps you by throwing up the Insert Image dialog).

    I have done a DIFF on the code for this dialog and it has not changed, so I suspect you must have changed the way you are working, or perhaps you never ran into this case before.


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

Lost Your Password?