Leave feedback
  • Question

    Non-breaking space and Line feed

Enter a new topic
  • Christofer Lindqvist Christofer Lindqvist StreamServe Employee
    0 likes 3946 views

    I have a setup with XMLIN and StoryTeller where i want to make sure that words are kept together without wrapping in the middle. I also want to be able to force a line feed wherever i want it in the text.

    After testing several different scenarios i found the examples below to work and was wondering if its a general working solution or if it only works in scenario.

    Non-breaking space =  
    Line feed = 


    So my input xml looks something like this:
    <T1006:position namn="Payment" text="I always want the sum 1&#160;000&#160;kr to be kept on the same line,&#xa;this text should come on a new line though"/>

    The text "1 000 kr" could now never be split between two lines and the text "this text should..." will always be on its own line.

    Regards,
    Christofer

    Thursday 02 September, 2010
  • Best Answer
    David Bares David Bares OpenText Employee Administrator StreamServe Employee
    0 likes

    I confirm that you selected the correct unicode commands for what you need to achieve in StoryTeller.

    Keep in mind that u000A (Line Feed) would create new paragraph.

    Since SP5 you can also use u2028 (Line Separator, &#8232;) to insert a soft line break.
    This break only wraps the text line, but does not create new paragraph. It behaves as if the text line wrapped naturally on an text area boundary. Same as if you use (Shift+Enter) from the keyboard when editing the text.
    Can be useful in numbered paragraphs, paragraphs with extra spacing, indents, etc.

    Thursday 02 September, 2010
  • Stefan Cohen Stefan Cohen StreamServe Employee Administrator
    0 likes

    XMLIn supports all character entity references. http://en.wikipedia.org/wiki/Character_entity_reference Oter event types (except maybe PreformatIN) will not recognize them as anything but text.

    There are two types of character references:

    • Predefined entites. Ex: &nbsp;
    • Character coding referenceing an unicode code point. Ex: &#xa0; or equally &#160;
    Thursday 02 September, 2010
  • David Bares David Bares OpenText Employee Administrator StreamServe Employee
    0 likes

    I confirm that you selected the correct unicode commands for what you need to achieve in StoryTeller.

    Keep in mind that u000A (Line Feed) would create new paragraph.

    Since SP5 you can also use u2028 (Line Separator, &#8232;) to insert a soft line break.
    This break only wraps the text line, but does not create new paragraph. It behaves as if the text line wrapped naturally on an text area boundary. Same as if you use (Shift+Enter) from the keyboard when editing the text.
    Can be useful in numbered paragraphs, paragraphs with extra spacing, indents, etc.

    Thursday 02 September, 2010