Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Spurious whitespace inserted in lists on document load

New Here ,
Mar 30, 2009 Mar 30, 2009

Copy link to clipboard

Copied

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
TOPICS
Structured

Views

743
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 31, 2009 Mar 31, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 01, 2009 Apr 01, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 01, 2009 Apr 01, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 02, 2009 Apr 02, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 05, 2009 Apr 05, 2009

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines