General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion How to display content </br> as a newline in Xmetal tab and normal preview

  • moshaik

    How to display content </br> as a newline in Xmetal tab and normal preview

    Participants 1
    Replies 2
    Last Activity 13 years, 6 months ago

    Hi All,

    I have content like below, In Xmetal I would like to see tab preview and normal view for the content </br> as a new line. I think tab and normal view will display by using CSS. is there any way to handile this in CSS ?

    aaaaaaaaaa </br> bbbbbbbbbbb

    expected :

    aaaaaaaaaa
    bbbbbbbbbbb

    Reply

    dcramer

    Reply to: How to display content &lt;/br&gt; as a newline in Xmetal tab and normal preview

    Nope.

    Reply

    Derek Read

    Reply to: How to display content &lt;/br&gt; as a newline in Xmetal tab and normal preview

    Given your description I agree with dcramer. You can't get what you want the way you have specified your XML.

    But, if your
    is supposed to be an actual element (rather than a sequence of escaped characters as you have shown it) you could try the following CSS:

    br {
    display:block;
    }

    This will not give you what you are asking for, but something close:

    aaaaaaaaaa

    bbbbbbbbbbb

    Note that this assumes your DTD declares these elements in a way that is similar to this:

    This also assumes that you need to see your
    element so that you can work with it. Hiding it completely seems like something that would make editing difficult (unless you provide some other user interface to add and remove them, which seems like more work than it is worth).

    If you want to render a carriage return instead of the
    element that will not be possible using CSS. However, in theory you could replace the
    using a small XFT form that contains no controls (those settings are in the CTM file, best edited using XMetaL Developer). Without knowing a lot more detail about what you really need I would not recommend doing this though, as there wouldn't really be much to gain as far as I can tell (other than having it “look nice” at the expense of making your documents more difficult to edit).

    While I'm still throwing out ideas, perhaps what you really want is to treat carriage returns as significant white-spaces? If that is the case you can throw away the idea of the
    element entirely (assuming this is a DTD or Schema you control) and then use the following CSS:

    Para {
    white-space: pre;
    }

    XMetaL Author 5.1 and 5.5 support pre, pre-wrap, normal and inherit for this CSS property. If you do this then you will want to set the appropriate pretting printing settings in your CTM file.

    Of course, you will need to take any transformations into account. Perhaps they might actually require the presence of a
    element or you prefer not to have special processing to handle the presence of carriage returns within specific elements like .

    Note: “Page Preview” (aka: “Browser Preview”) is generated content and is controlled by a transformation process (probably XSLT depending on how you have configured things) so not really related to any of the above, which deals with TagsOn and Normal view (the standard editing views) only.

    Reply

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

Lost Your Password?

Products
Downloads
Support