Spaces removed

  • Alex

    Alex - 2008-02-08


    When I supply data that contains multiple spaces like in "description   123". The spaces are lost and only one space ends up in the final document.
    Since i'm converting the merged odt to a Word doc this also might be the problem - but unlikely.



    • Mirko Nasato

      Mirko Nasato - 2008-02-08

      Hi Stephan,

      OpenDocument files are XML, and XML collapses whitespace.

      If you want two spaces you'd need to pass '<text:s text:c="2"/>', where the 'c' attribute is the number of spaces.

      Kind regards


    • Alex

      Alex - 2008-02-11


      Thanks for the answer but I do not get it.

      I'm calling DocumentTemplate.createDocument(Object model, OutputStream output), where I pass in the data as a Map.
      The map contains an entry <key, value> where the value contains multiple spaces like "description    123".

      How could I manipulate the xml from this call?? Obviously I cannot, so i must be doing something radically wrong.

      (BTW I still would expect the library to hide the underlying details from me)



    • Alex

      Alex - 2008-02-11

      I just noticed that the above post also has the spaces removed in the sample string (ironic ;-)

      So to be clear; I meant "description____123" where '_' means a space


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks