Home Forums DITA and XMetaL Discussion pretty printing often causes problems with eclipse/webhelp output formats Reply To: pretty printing often causes problems with eclipse/webhelp output formats

Derek Read

Reply to: pretty printing often causes problems with eclipse/webhelp output formats

The setting in our pretty printing settings that is introducing white-space is that the max line length (which defaults to 80) is being reached in some cases, and XMetaL chooses (as designed) to wrap those lines at the first possible white-space, which may happen to be inside a element (or any other element not specifically designated as “do not pretty print”) if there is enough content before that element to put the line over the 80 character limit.

It still seems odd to me that this causes issues with XHTML-based outputs, and that part of your issue I cannot reproduce yet. I'm pretty sure I've tested all the possibilities by having pretty printing turned on and using this XML that tries to mimic your content and test various possibilities with and withour and with a that has a carriage return within it as in one of yours:

[code]
 task title
 short description
 

 


 this is step 1
 

 

  • name1
     is a descriptive name for the attribute.
  • name2
     is a descriptive name for the attribute.
  • name3
     is a descriptive name for the attribute.
  • name4
    varname
    is a descriptive name for the attribute.
  • name5
     is a descriptive name for the attribute.

 


 
[/code]

When I generate HTML outputs from that file (it is identical for all HTML outputs, including Webhelp) they don't seem to appear like your screenshot, and the HTML source actually looks like the following. All spaces are “regular” spaces and appear here as in the actual output, so the DITA OT is doing some form of normalization, at least in my case:

[code]    

this is step 1
       
     

  • name1 is a descriptive name for the attribute.
  • name2 is a descriptive name for the attribute.
  • name3 is a descriptive name for the attribute.
  • name4 varname is a descriptive name for the attribute.
  • name5 is a descriptive name for the attribute.

[/code]

I suspect at this point that somehow some changes you have made to the DITA OT are introducing the behaviour you are seeing, or my test case is not the same as what your actual content looks like, or there is some other trigger. I'm pretty sure it must be the first case as I clearly see pretty printing in my input file (as above) and that white-space is collapses by the DITA OT in my output (as above).

When loaded into a browser (it doesn't matter which because the markup is so simple) I see what I've attached as test_screenshot.jpg

Reply

Products
Downloads
Support