Logging FrameMaker book errors in a text file

Lynne A. Price lprice at txstruct.com
Mon Jun 29 10:37:11 PDT 2009


Gordon,
   You are correct that by default FM exports a forced return as a regular 
return. There are other special characters that FM converts to more usual 
characters. For example, it exports a discretionary hyphen as a regular hyphen.
   There are a couple of read/write rules that may help in your situation. 
You can use the Preserve Line Break rule as a subrule of an element rule to 
tell FrameMaker:

1) When it is writing XML, to generate a line break in XML at the end of 
every line in the FrameMaker document

2) When it is reading XML, to convert XML line breaks to FrameMaker forced 
returns

Preserve Line Break is often combined with the Writer Line Break rule. By 
default, FrameMaker tries to limit lines to 70 characters or so in length, 
so that the generated XML can easily be viewed in a text editor that 
doesn't wrap lines. Writer Line Break allows you to specify a different 
limit. You might therefore use a rule such as:

element "x" {
   preserve line breaks;
   writer line break is 10000 characters;
   }

to produce XML in which the only line breaks within an x element are those 
corresponding to forced returns.

Another approach is to map the forced return character to an entity. Make 
sure your DTD declares an entity such as ForcedReturn. It doesn't really 
matter how you have defined the entity. For example, you might include a 
declaration such as:

<!ENTITY ForcedReturn "FM forced return character">

Then use a read/write rule to map the entity to the forced return character:

entity "ForcedReturn" is fm char 0x09;

Unfortunately, FM does not seem to honor this rule if the forced return 
character occurs within a text range element that assigns character 
properties. In such cases, I have defined an empty element with a prefix of 
a forced return and used this element wherever the forced return character 
is needed.

         --Lynne







At 08:45 AM 6/29/2009, Gordon Furbush wrote:

>For some reason, the XML exported from FrameMaker 8 does not recognize 
>forced returns (Control-Enter).  We've reported this as a bug, but Adobe 
>has effectively ignored us and we've had no luck getting any type of 
>workaround other than downgrading to FrameMaker 7.

Lynne A. Price
Text Structure Consulting, Inc.
Specializing in structured FrameMaker consulting, application development, 
and training
lprice at txstruct.com            http://www.txstruct.com
voice/fax: (510) 583-1505      cell phone: (510) 421-2284 




More information about the framers mailing list