Skip to main content
frameexpert
Community Expert
Community Expert
May 9, 2023
Question

Create a structured book with xml without entites

  • May 9, 2023
  • 1 reply
  • 470 views

Hi All, I want to programmatically create a structured FrameMaker book without using entities. Is there an equivalent XML syntax that I can use? I am using XSLT to create the book and I don't want to use entities if I can avoid it. Below is an example of a current book with its entity references. Thank you very much.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE manual SYSTEM "UserManual.dtd" [

<!-- Begin Document Specific Declarations -->
<?Fm Validation Off?>

<!ENTITY bkc1 SYSTEM "GN800042-VGRShreddingMill_UM_cover.e01">
<!ENTITY bkc2 SYSTEM "GN800042-VGRShreddingMill_UM_en-USTOC.e02">
<!ENTITY bkc3 SYSTEM "BP00001.e03">
<!ENTITY bkc4 SYSTEM "BP00010.e04">
<!ENTITY bkc5 SYSTEM "GN800042.e05">
<!ENTITY bkc6 SYSTEM "SC00019.e06">
<!ENTITY bkc7 SYSTEM "SC00090.e07">

<!-- End Document Specific Declarations -->

]>
<?Fm Book?><manual>&bkc1;<toc>&bkc2;</toc>&bkc3;&bkc4;&bkc5;&bkc6;&bkc7;</manual>
    This topic has been closed for replies.

    1 reply

    Inspiring
    May 15, 2023

    Rick,

        The Generate Book r/w rule specifies whether to create a book and its components as specified by processing instructions in the XML document or according to the names of the elements that occur in the XML document. Look in the Structured Application Developer’s Reference for details of the syntax of Generate Book and its subrules.

      --Lynne

    frameexpert
    Community Expert
    Community Expert
    May 15, 2023

    Thank you Lynne. I will take a look and post an update.

    Inspiring
    May 16, 2023

    Rick,

       The advantage of using processing instructions is that you can use content to determine the filename. For example, if every chapter goes into a different file, you can derive the filename from the chapter title with XSLT.  If you use element names, FM uses the same basename with a numeric suffix for the filename. Of course, you can change filenames with the FDK or a script.

      --Lynne