Skip to main content
Participant
June 30, 2014
Question

FM delete sometimes spacers and sometimes not

  • June 30, 2014
  • 1 reply
  • 567 views

DATA


  1. I write <p><ph>This is a sentence. </ph><ph>This is a sentence. </ph><p>
  2. I save and close the file
  3. When I open it at new, I remark :
    • the first <ph> still have a spacer after the point
    • the second <ph> have no spacer after the point


QUESTION

Do you know where we can set in FrameMaker11 to not delete spacers ?


Other solution can be put a WHITESPACE between the elements <ph>, but it seems this causes problems while publishing.

This topic has been closed for replies.

1 reply

ScottPrentice
Inspiring
June 30, 2014

Hi Decock...

Whitespace handling is a tricky issue. It's my understanding that you can expect XML processors to do the following (unless the DTD explicitly sets whitespace to "preserve") ..

  • collapse multiple whitespace characters into one (a whitespace character is any of these: space, tab, newline)
  • trim leading and trailing whitespace in an element

That means that your "trailing" whitespace in the <ph> is likely to be stripped. I would put the whitespace between the <ph> elements rather than inside the <ph>, and would expect that to work better in more cases.

However .. FM11 had had trouble with whitespace handling, and it may not do exactly what you expect or want. First, make sure you've installed the latest FM11 update (they did make fixes to whitespace handling). Then try moving your whitespace into a better location (suggested above). If that doesn't work, open the maker.ini file and set the following parameter to "Off" ..

     RemoveExtraWhiteSpacesOnXMLImport=Off

If that's still not doing what you want, you might take a look at this article from Scriptorium ..

     http://www.scriptorium.com/2010/01/removing-whitespace-structured-framemaker/

Or .. since it looks like you're using DITA, you might consider using DITA-FMx (which handles whitespace properly) ..

     http://leximation.com/dita-fmx/

Cheers!

Scott Prentice

Leximation, Inc.

www.leximation.com

June 30, 2014

Thanks for posting this response. I had the exact same question this morning. I followed your advice to turn off the "RemoveExtraWhiteSpacesOnSMLImport" setting. It works for me.

One small thing. I had to run Notepad as an Administrator to be able to edit the maker.ini file.

I recently upgraded to FrameMaker 12 from FrameMaker 9, where this issue didn't exist. Some whitespace would be trimmed, but not the trailing spaces at the beginnings and ends of elements. Unfortunately, I didn't notice the issue until generating a large document today. I think it removed many spaces in my topics, which I'll need to replace before publishing.

Thanks again!

- Maura

ScottPrentice
Inspiring
June 30, 2014

Hi Maura...

Each version of FM has slightly different whitespace problems. FM12 is actually quite good, so if it's stripping whitespace it may be because you've put it in a place that it shouldn't be in the first place. If you do disable this feature, keep in mind that you may run into the opposite problem with there being too much whitespace. This probably won't happen if the XML files are authored in FM, but if they are coming from other XML editors that add pretty-printed whitespace, you'll see trouble.

I neglected to mention that if you just can't get a space to stick, you can always use a "hard space" (CTRL+SPACE), which should work in all cases.

Cheers,

…scott