Skip to main content
Participating Frequently
March 31, 2009
Question

Spurious whitespace inserted in lists on document load

  • March 31, 2009
  • 4 replies
  • 813 views
Gurus and browsers:

I have a Frame 8.0 application which on the whole behaves correctly, except that it insists on inserting whitespace between elements in lists whenever it loads an XML file for editing. Wherever this occurs the whitespace leads to an unwanted line break in the document view.

Sometimes, if the list is a bulleted list, the unwanted line break is augmented by a duplicate of the bullet symbol - but not in the document view, in the structure view. It all looks like list processing is a little bit broken.

Because this issue is not at all trivial I can't describe a test case in a few lines, but I have a sample document which illustrates the problem. Would anybody be prepared to have a brief look to see if they can identify what is going wrong and why?

Cheers
Trevor
This topic has been closed for replies.

4 replies

Inspiring
April 2, 2009
Trevor,

try to get hold of the temporary XML file in the local temp folder. To achieve this I force a message which fires when FrameMaker opens the preprocessed XML. The log window displays path and name of the document and you can make a copy of it while the log message is not accepted.

This might give you more insight into what is done different by Xalan.

- Michael
Participating Frequently
April 6, 2009

Thank you Michael, that is a useful tip.

I see that the new format of the forums has messed up the display of code fragments in old messages, such as your earlier one in this thread, which isn't particularly helpful, is it? Although maybe it won't be such a challenge to include them in future :-)

Cheers

T

Participating Frequently
April 1, 2009
Hi Michael, thanks for replying

My stylesheet has:
< xsl:output doctype-system="fmdocs.dtd" method="xml" encoding="UTF-8" indent="no" >
and it also has
< xsl:strip-space elements="document section table list ul ol ..." />

The problem isn't systematic indentation as in pretty-print indentation, but single spaces and/or newlines which are inserted here and there. I thought at first it was whitespace from the XSL stylesheet itself but I've gone through the stylesheet with a toothcomb and it isn't, plus when I use any other XSLT processor to run this stylesheet outside of Frame I get exactly the output I want and expect.

Regards
Trevor
Inspiring
April 1, 2009
I do have a FM8 structapp running with a preprocessing XSL. I use the command



to suppress indentation. I guess it is also a good idea to have a DTD linked to the XML.

I was surprised to see that my stylesheet does not use



which can help as well.

- Michael
Participating Frequently
March 31, 2009
Well in simplifying my sample document so that it doesn't require running a pre-load XSL phase I have identified the culprit and it is Xalan.

The stylesheet has been written so as to suppress optional whitespace in the output file but the version of Xalan which is being run within Frame is inserting lots of whitespace of its own regardless. There are significant differences between the XML output by Xalan-C and that output by running the same stylesheet with another XSL processor.

Is there some way to force Frame/Xalan NOT to insert this whitespace?

Cheers
T