Skip to main content
Known Participant
November 4, 2013
Question

Disapperaing end-of-line/whitespace

  • November 4, 2013
  • 2 replies
  • 951 views

I have a problem with xml-import into FM11. When the eol in the xml-file appears after an element in the xml-file. like this:

Ved samtidig bruk bør kun <teller>1</teller>/<nevner>4</nevner>

av vanlig azatioprindose gis.

the result is like this:

Ved samtidig bruk bør kun 1/4av vanlig azatioprindose gis.

... the space after 1/4 is missing. It does not appear as an whitespace in the FM file as it should, - and as it does when it's not after an element. Is this a known problem with FM11, and are there any ways to solve the issue?

DagB -

This topic has been closed for replies.

2 replies

ScottPrentice
Inspiring
November 4, 2013

Is this in a "whitespace preserved" element? Meaning .. your r/w rules file needs to define the container element as ..

element "pre"

{

  writer line break is 99999 characters;

  reader line break is forced return;

}

.. or something similar (you don't show the tag that contains the entire phrase .. if not "pre", then use your element name).

In most cases that will allow linebreaks to be preserved, however they will get lost if an element end "touches" the linebreak. If you add a space between the element end ("</nevner>") and the linebreak (EOL) .. it *should* work.

...scott

d.brekkeAuthor
Known Participant
November 4, 2013

Hi, Scott

And thanks for the response.

The fact that the element-end "touches" the eol is the actual problem, and the question is whether this is normal xml-interpretation, or does FM handle this "wrong"?


DagB

ScottPrentice
Inspiring
November 4, 2013

No .. this isn't proper XML interpretation. This is an FM bug that I hope will be fixed in the next release. I've been reporting it for years.

DITA-FMx provides a fix for it, but if you're not using DITA (or don't want to use DITA-FMx) you could create an ExtendScipt that runs on the "pre-save" notification which scans the document for this situation and adds a space if one doesn't exist.

Cheers,

...scott

Inspiring
November 4, 2013

Hi,

you could change this line in the maker.ini from:

RemoveExtraWhiteSpacesOnXMLImport=On

to

RemoveExtraWhiteSpacesOnXMLImport=Off

Hope that helps

Cheers

Alex

d.brekkeAuthor
Known Participant
November 4, 2013

Hi, Alex

Thanks for the quick response, but I'm sorry to say that RemoveExtraWhitespace... is already set Off because of an earlier, similar problem... so the solution doesn't lay there ...

DaGB