FrameMaker and the XML Whitespaces Normalization

Amongst the blitz of all the features packed in Adobe Framemaker 10 release one feature missed the limelight. And that’s XML whitespace normalization. The problem used to arise when XMLs pretty printed in other XML tools were brought to Framemaker. FrameMaker would not ignore whitespaces introduced by other XML editors, resulting in excess spaces in paragraphs and table cells and unnecessary spaces between paragraphs. Various solutions in the form of XSL transforms were commonly being used in the techcomm community.

Although it was debatable whether what Framemaker was doing was the right thing or not? We thought that it is concern faced by many FrameMaker users and hence decided to resolve this issue. Now with Framemaker 10, your XMLs pretty printed in other tools would open perfectly fine. This should provide XML authors relief from handling such spaces by manual deletion or by use of an XSLT . FrameMaker would drop and ignore such spaces appearing in the element contents in the following scenarios:

  1. Multiple Spaces occuring in the middle of the element content.
  2. Whitespaces occurring at the element endings.
  3. Whitespaces around inline elements (with/without sibling inline elements).
      NOTE: If you are a heavy user of inline conrefs in DITA parlance you might want to switch this normalization off as described below. Else you might find spaces between inline conrefs getting collapsed.
  4. XML provides a special attribute ‘xml:space’ for controlling the whitespace handling at the element level. This attribute shall be honored if specified. @xml:space has only two valid values as per the XML specification – ‘preserve’ and ‘default’. Therefore for
    1. default: Whitespace handling mechanism shall be used as per the FrameMaker’s setting.
    2. preserve: Whitespaces shall be preserved as per the old behavior; ignoring any of whitespace related settings in FrameMaker.

If at any point in time you want to revert back to the earlier behavior you have the flexibility to modify the maker.ini preference setting “RemoveExtraWhiteSpacesOnXMLImport” to enable/disable this feature. By default, this is enabled.

Please share any feedback that you might have.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s