Home › Forums › General XMetaL Discussion › How to display content </br> as a newline in Xmetal tab and normal preview › Reply To: How to display content </br> as a newline in Xmetal tab and normal preview
Reply to: How to display content </br> as a newline in Xmetal tab and normal previewMarch 19, 2009 at 8:23 pm
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:
This will not give you what you are asking for, but something close:
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:
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.