Debug composition log

When debug mode is enabled, TopLeaf generates an enhanced composition log when the partition is typeset. The log lists the element context in which the current tag is located followed by the mapping rule invoked for that tag. Any output text is explicitly noted. Finally when each tag ends we are reminded of which mapping was called:

 CONTEXT: /book/chapter/title
  CUSTOM: <%Enum1/>
     MAP: %Enum1
    DATA: "1."
  ENTITY: &nbsp;
  ENTITY: &nbsp;
  ENTITY: &nbsp;
    DATA: "Mapping "
  ENTITY: &mdash;

Custom markers and their mappings are noted, along with any entity that may be encountered.

 CONTEXT: $document
  SYSTEM: <$headfoot id="rightpage-footright" >
     MAP: $headfoot[id=rightpage-footright]
    DATA: "Page "
  SYSTEM: </$headfoot>
     END: $headfoot[id=rightpage-footright]
  SYSTEM: </$document>
     END: $document

   FOLIO: 1

 PROCESS: DOCUMENT

You will notice that $document forms the context for system markers and their mappings. TopLeaf internally views all headers/footers as invocations of a single master $headfoot mapping. The last action taken on any page is to include the page folio within the log. We are then ready to resume processing the source document.

****************************************************************
  ERROR: 023 - can't open logo - "MapNewTagg.png".
IN FILE: C:\TopLeaf\TopLeaf_Docco\Mapping_Guide\MapMan.xml, LINE: 280
   NEAR: ...hic fileref="TLshots/MapNewTagg.png" align="center"/>
  FOLIO: 5
****************************************************************

Errors and warnings include the name of the document being processed, a fragment of the document content, and a page folio near which the problem occurred.