XML Data Format Example

XML allows the same data to be used for multiple presentation media. In Figure XML Data File XML data file is shown formatted for printing with PPFA's XML support.

XML Data File

<?xml version="1.0" ?>
<?xml:stylesheet type="text/xsl" href=bbbank.xsl"?>
<!--                                                -->
<!-- Data for XML Example                           -->
<!--                                                -->
<document>
<bankstatement>
 <customer>
  <acctno>026-257311</acctno>
  <name>Justin Case</name>
  <street>123 Redlight Lane</street>
  <cityst>Twistnshout, MA 02345</cityst>
 </customer>
 <begindate>JAN 02, 2002</begindate>
 <enddate>FEB 01, 2002</enddate>
<!--                                                -->
<!-- Page number generator                          -->
<!--                                                -->
 <pagenumber>
<!--                                                -->
<!-- New account type = Super Checking Account      -->
<!--                                                -->
 <supercheckingactivity type="superchk">
  <balance>
   <begin>2591.24</begin>
   <credit>1946.93</credit>
   <debit>1956.43</debit>
   <svchg>0.00</svchg>
   <end>0.00</end>
  </balance>
<!--                                                -->
<!-- Credit                                         -->
<!--                                                -->
  <credits>
   <transaction>
    <type>DEPOSIT</type>
    <date>01/05/2002</date>
    <amt> 26.90</amt>
   </transaction>
   <transaction>
    <type>AUTO DEPOSIT</type>
    <date>01/05/2002</date>
    <amt> 954.27</amt>
   </transaction>
   <transaction>
    <type>AUTO DEPOSIT</type>
    <date>01/30/2002</date>
    <amt> 954.27</amt>
   </transaction>
   <transaction>
    <type>INTEREST</type>
    <date>01/31/2002</date>
    <amt>  11.49</amt>
   </transaction>
   <total>
  </credits>
<!--                                                -->
<!-- Checks                                         -->
<!--                                                -->
  <checks>
   <transaction>
    <chkno>352</chkno>
    <date>01/04/2002</date>
    <amt> 321.50</amt>
   </transaction>
   <transaction>
    <chkno>353</chkno>
    <date>01/05/2002</date>
    <amt> 100.00</amt>
   </transaction>
   <transaction>
    <chkno>354</chkno>
    <date>01/10/2002</date>
    <amt> 122.30</amt>
   </transaction>
   <transaction>
    <chkno>355</chkno>
    <date>01/11/2002</date>
    <amt>  59.95</amt>
   </transaction>
   <transaction>
    <chkno>356</chkno>
    <date>01/15/2002</date>
    <amt> 852.33</amt>
   </transaction>
   <transaction>
    <chkno>357</chkno>
    <date>01/30/2002</date>
    <amt> 500.35</amt>
   </transaction>
  </checks>
<!--                                                -->
<!-- Daily Balances                                 -->
<!--                                                -->
  <balances>
   <baldata>
    <date>01/04/2002</date>
    <bal>2269.74</bal>
   </baldata>
   <baldata>
    <date>01/05/2002</date>
    <bal>2196.64</bal>
   </baldata>
   <baldata>
    <date>01/10/2002</date>
    <bal>2074.34</bal>
   </baldata>
   <baldata>
    <date>01/11/2002</date>
    <bal>2014.39</bal>
   </baldata>
   <baldata>
    <date>01/15/2002</date>
    <bal> 852.33</bal>
   </baldata>
   <baldata>
    <date>01/30/2002</date>
    <bal> 500.35</bal>
   </baldata>
   <total>2581.74</total>
  </balances>
<!--                                                -->
<!-- Statement trailer generator                    -->
<!--                                                -->
  <stmttrailer/>
 </superbankingactivity>
</bankstatement>
<bankstatement>
 <customer>
  <acctno>887-278342</acctno>
  <name>Anna Merkin</name>
  <street>123 Chantilly Lane</street>
  <cityst>Long Neck Goose, VA 21177</cityst>
 </customer>
<begindate>JAN 02, 2002</begindate>
<enddate>FEB 01, 2002</enddate>
<!--                                                -->
<!-- Page number generator                          -->
<!--                                                -->
 <pagenumber>
<!--                                                -->
<!-- New account type = Super Checking Account      -->
<!--                                                -->
 <supercheckingactivity="suprchk">
  <balance>
   <begin>3722.23</begin>
   <credit>2084.58</credit>
   <debit>1908.94</debit>
   <svchg>0.00</svchg>
   <end>3897.87</end>
  </balance>
<!--                                                -->
<!-- Credits                                        -->
<!--                                                -->
  <credits>
   <transaction>
    <type>DEPOSIT</type>
    <date>01/11/2002</date>
    <amt>  17.37</amt>
   </transaction>
   <transaction>
    <type>AUTO DEPOSIT</type>
    <date>01/15/2002</date>
    <amt>1029.81</amt>
   </transaction>
   <transaction>
    <type>AUTO DEPOSIT</type>
    <date>01/30/2002</date>
    <amt>1029.81</amt>
   </transaction>
   <transaction>
    <type>INTEREST</type>
    <date>01/31/2002</date>
    <amt>   7.59</amt>
   </transaction>
   <total>2084.58</total>
  </credits>
<!--                                                -->
<!-- Checks                                         -->
<!--                                                -->
  <checks>
   <transaction>
    <chkno>759</chkno>
    <date>01/03/2002</date>
    <amt> 144.00</amt>
   </transaction>
   <transaction>
    <chkno>760</chkno>
    <date>01/04/2002</date>
    <amt>  93.11</amt>
   </transaction>
   <transaction>
    <chkno>761</chkno>
    <date>01/09/2002</date>
    <amt> 322.72</amt>
   </transaction>
   <transaction>
    <chkno>762</chkno>
    <date>01/11/2002</date>
    <amt> 102.43</amt>
   </transaction>
   <transaction>
    <chkno>763</chkno>
    <date>01/17/2002</date>
    <amt> 794.46</amt>
   </transaction>
   <transaction>
    <chkno>764</chkno>
    <date>01/29/2002</date>
    <amt> 452.22</amt>
   </transaction>
  </checks> 
<!--                                                -->
<!-- Daily Balances                                 -->
<!--                                                -->
  <balances>
   <baldata>
    <date>01/04/2002</date>
    <bal>3722.23</bal>
   </baldata>
   <baldata>
    <date>01/05/2002</date>
    <bal>3629.12</bal>
   </baldata>
   <baldata>
    <date>01/10/2002</date>
    <bal>3306.40</bal>
   </baldata>
   <baldata>
    <date>01/11/2002</date>
    <bal>3221.34</bal>
   </baldata>
   <baldata>
    <date>01/15/2002</date>
    <bal>4251.15</bal>
   </baldata>
   <baldata>
    <date>01/30/2002</date>
    <bal>3897.87</bal>
   </baldata>
   <total>3897.87</total>
  </balances>
<!--                                                -->
<!-- Statement trailer generator                    -->
<!--                                                -->
  <stmttrailer>
 </supercheckingactivity>
</bankstatement>
</document>

Figure XML Data Printed Output shows the resulting printed output from the XML data in Figure XML Data File.

XML Data Printed Output

XML Data Printed OutputXML Data Printed Output

The page definition used to create the output in Figure XML Data Printed Output is shown in Figure Page Definition for XML Output:

Page Definition for XML Output

  PAGEDEF bbbank replace yes
          WIDTH 8.5 in
          HEIGHT 11.0 in
          UDTYPE EBCDIC;
    FONT  comp  a075nc  TYPE EBCDIC;/*Big Brother Bank font  */
    FONT  ital  a175dc  TYPE EBCDIC;/*Italic theme           */
    FONT  addr  a075dc  TYPE EBCDIC;/*Big Brother address    */
    FONT  varb  gt10    TYPE EBCDIC;/*Variable data          */
    FONT  super a075dc  TYPE EBCDIC;/*Super Checking Account */
    FONT  head   a055ac TYPE EBCDIC;/*Headings               */
    FONT  bhead  a075ac TYPE EBCDIC;/*Bold Headings          */
   /************************************************/
   /** QTAG declarations                          **/
   /************************************************/
   /*---- statmid declarations --------------------*/
    DEFINE statmid   QTAG C'document',
                          C'bankstatement',C'customer';
    DEFINE acctno    QTAG C'document',
                          C'bankstatement',C'customer',C'acctno';
    DEFINE name      QTAG C'document',
                          C'bankstatement',C'customer',C'name';
    DEFINE street    QTAG C'document',
                          C'bankstatement',C'customer',C'street';
    DEFINE cityst    QTAG C'document',
                          C'bankstatement',C'customer',C'cityst';
    DEFINE begindate QTAG C'document',
                          C'bankstatement',C'begindate';
    DEFINE enddate   QTAG C'document',
                          C'bankstatement',C'enddate';
   /*---- statsum declarations --------------------*/
    DEFINE statsum   QTAG C'document',
                          C'bankstatement',C'supercheckingactivity'
                          C'balance'    ;
    DEFINE statsumf1 QTAG C'document',
                          C'bankstatement',C'supercheckingactivity'
                          C'balance', c'begin';
    DEFINE statsumf2 QTAG C'document',
                          C'bankstatement',C'supercheckingactivity'
                          C'balance', c'credit';
    DEFINE statsumf3 QTAG C'document',
                          C'bankstatement',C'supercheckingactivity'
                          C'balance', c'debit';
    DEFINE statsumf4 QTAG C'document',
                          C'bankstatement',C'supercheckingactivity'
                          C'balance', c'svchg';
    DEFINE statsumf5 QTAG C'document',
                          C'bankstatement',C'supercheckingactivity'
                          C'balance', c'end';
   /*---- crdata  declarations --------------------*/
    DEFINE crheader  QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'credits';
    DEFINE crdata1   QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'credits',C'transaction',C'type' ;
    DEFINE crdata2   QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'credits',C'transaction',C'date' ;
    DEFINE crdata3   QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'credits',C'transaction',C'amt'  ;
    DEFINE crtotal   QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'credits',C'total';
   /*---- ckdata  declarations --------------------*/
    DEFINE ckheader  QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'checks' ;
    DEFINE ckdata1   QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'checks',C'transaction',C'chkno' ;
    DEFINE ckdata2   QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'checks',C'transaction',C'date' ;
    DEFINE ckdata3   QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'checks',C'transaction',C'amt' ;
    DEFINE cktotal   QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'checks', C'total';
   /*---- baldata declarations --------------------*/
    DEFINE balhead   QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'balances';
    DEFINE baldata1  QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'balances',C'baldata',C'date' ;
    DEFINE baldata2  QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'balances',C'baldata',C'bal' ;
    DEFINE baltotal  QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'balances', C'total';
   /*---- misc.   declarations --------------------*/
    DEFINE statrail  QTAG C'document',
                          C'bankstatement',C'supercheckingactivity',
                          C'stmttrailer';
    DEFINE pgenum    QTAG C'document',
                          C'bankstatement',C'pagenumber';
   /*----------------------------------------------*/
   /*---- end of QTAG declarations ----------------*/
   /*----------------------------------------------*/
    PAGEFORMAT xchub1   TOPMARGIN 2 in BOTMARGIN  1 in;
   /************************************************/
   /** statmid  HEADER                            **/
   /************************************************/
   XLAYOUT statmid   PAGEHEADER NEWPAGE
           POSITION .6 in ABSOLUTE .55 in;
      FIELD  TEXT C'Big Brother Bank'  ALIGN LEFT
                      FONT comp ;/* default to LAYOUT positioning */
      FIELD  TEXT C'"We watch over you"' ALIGN LEFT
                      POSITION   0 NEXT
                      FONT ital ; /*default to next line          */
      FIELD  TEXT C'P.O. Box 1573' ALIGN LEFT
                      POSITION   0 NEXT
                      FONT addr ; /*default to next line          */
      FIELD  TEXT C'Beantown, MA  02116' ALIGN LEFT
                      POSITION   0 NEXT
                      FONT addr ; /*default to next line          */
      FIELD  TEXT C'Account Number:' ALIGN LEFT
                      POSITION  4.3 in .2 in
                      FONT head ; /*New area on right             */
      FIELD  TEXT C'Statement Begin Date:' ALIGN LEFT
                      POSITION  4.3 in  NEXT
                      FONT head ; /*New area on right             */
      FIELD  TEXT C'Statement End Date:' ALIGN LEFT
                      POSITION  4.3 in  NEXT
                      FONT head ; /*New area on right             */
   XLAYOUT acctno    PAGEHEADER CONTINUE
     POSITION SAME SAME;
      FIELD  START  1 LENGTH 10          ALIGN RIGHT
                      POSITION  7.5 in .2 in
                      FONT varb ;
   XLAYOUT begindate PAGEHEADER CONTINUE
     POSITION SAME SAME;
      FIELD  START 1 LENGTH 12
                      POSITION  7.5 in .37 in
                      ALIGN RIGHT
                      FONT varb ;
   XLAYOUT enddate   PAGEHEADER CONTINUE
     POSITION SAME SAME;
      FIELD  START 1 LENGTH 12
                      POSITION  7.5 in .53 in
                      ALIGN RIGHT
                      FONT varb ;
   XLAYOUT name      PAGEHEADER CONTINUE
     POSITION SAME SAME;
      FIELD  START 1 LENGTH 19          ALIGN LEFT
                      POSITION  1.1 in  .9 in
                      FONT varb ;
   XLAYOUT street    PAGEHEADER CONTINUE
     POSITION SAME SAME;
      FIELD  START 1 LENGTH 19          ALIGN LEFT
                      POSITION  1.1 in  1.07 in
                      FONT varb ;
   XLAYOUT cityst    PAGEHEADER CONTINUE
     POSITION SAME SAME;
      FIELD  START 1 LENGTH 22          ALIGN LEFT
                      POSITION  1.1 in  1.23 in
                      FONT varb ;
   /************************************************/
   /** statsum  BODY                              **/
   /************************************************/
   XLAYOUT   statsum  BODY
                      POSITION .6 in .5 in;
      FIELD  TEXT C'Super Checking Account Activity'
                      FONT super ;/* Static text - Super Checking */
      DRAWGRAPHIC LINE  ACROSS 7.5 IN LINEWT BOLD
           POSITION  0  .15 in
           copy   down 2 spaced 1 mm;
      FIELD  TEXT C'Beginning Balance'
                      POSITION  .3 in .4 in
                      FONT head  ;/* Static text - first header   */
      FIELD  TEXT C'Credits'
                      POSITION 2.4 in CURRENT
                      FONT head  ;/* Static text - first header   */
      FIELD  TEXT C'Debits'
                      POSITION 3.6 in CURRENT
                      FONT head  ;/* Static text - first header   */
      FIELD  TEXT C'Service Charge'
                      POSITION 4.9 in CURRENT
                      FONT head  ;/* Static text - first header   */
      FIELD  TEXT C'Ending Balance'
                      POSITION 6.3 in CURRENT
                      FONT head  ;/* Static text - first header   */
     XLAYOUT statsumf1 BODY
                      POSITION SAME .6 in;
      FIELD  START  1  LENGTH  8
                      POSITION  .6 in CURRENT
                      FONT varb  ;/* Variable text - Beg balance  */
    XLAYOUT statsumf2 BODY
                      POSITION SAME SAME;
      FIELD  START 1   LENGTH  8
                      POSITION 2.2 in CURRENT
                      FONT varb  ;/* Variable text - Credits      */
     XLAYOUT statsumf3 BODY
                      POSITION SAME SAME;
      FIELD  START 1   LENGTH  8
                      POSITION 3.4 in CURRENT
                      FONT varb  ;/* Variable text - Debits       */
     XLAYOUT statsumf4 BODY
                      POSITION SAME SAME;
      FIELD  START 1   LENGTH  5
                      POSITION 5.0 in CURRENT
                      FONT varb  ;/* Variable text - Service Chrg */
     XLAYOUT statsumf5 BODY
                      POSITION SAME SAME;
      FIELD  START 1   LENGTH  8
                      POSITION 6.5 in CURRENT
                      FONT varb  ;/* Variable text - End Balance  */
      DRAWGRAPHIC LINE  ACROSS 7.5 IN LINEWT BOLD
               POSITION  0 .1 in;
   /************************************************/
   /** crheader GROUPHEADER                       **/
   /************************************************/
   XLAYOUT   crheader   GRPHEADER XSPACE .2 in
                     POSITION  SAME .3 in;
      FIELD  TEXT C'Credits'
                      FONT bhead  ;/* Static text - Credits      */
      FIELD  TEXT C'Description'
                      POSITION  1.3 in   CURRENT
                      FONT  head  ;/* Stat text - Deposit Descr. */
      FIELD  TEXT C'Date'
                      POSITION  3.2 in   CURRENT
                      FONT  head  ;/* Static text - Date         */
      FIELD  TEXT C'Amount'
                      POSITION  5.0 in   CURRENT
                      FONT  head  ;/* Stat text - Amount of deposit*/
      DRAWGRAPHIC LINE  ACROSS 6.2 IN LINEWT BOLD
                      POSITION 1.3 in next;
   /************************************************/
   /** crdata   BODY                              **/
   /************************************************/
   XLAYOUT   crdata1  BODY  GROUP;
      FIELD  START  1 LENGTH 13
                      POSITION  1.3 in  CURRENT
                      FONT  varb  ;/* Variable text - Description */
   XLAYOUT   crdata2  BODY  GROUP   position same same;
      FIELD  START  1 LENGTH 8
                      POSITION  3 in  CURRENT
                      FONT  varb  ;/* Variable text - Date        */
  XLAYOUT   crdata3  BODY  GROUP   position same same;
      FIELD  START  1 LENGTH 8     ALIGN RIGHT
                      POSITION  5.6 in  CURRENT
                      FONT  varb  ;/* Variable text - Amount      */
   /************************************************/
   /** crtotal  BODY                              **/
   /************************************************/
   XLAYOUT   crtotal  BODY  GROUP;
      FIELD  TEXT C'Total Credits'
                      POSITION  1.5 in   .2 in
                      FONT bhead  ; /* Stat text - Total credits  */
      FIELD  START 1 LENGTH 8   ALIGN RIGHT
                      POSITION  7.3 in  CURRENT
                      FONT  varb  ; /* Variable text - Amount     */
      DRAWGRAPHIC LINE  ACROSS 7.5 IN LINEWT BOLD
                      POSITION   0  next;
   /************************************************/
   /**  ckheader  GROUPHEADER                     **/
   /************************************************/
   XLAYOUT   ckheader   GRPHEADER XSPACE .2 IN
                      POSITION   SAME .6 in;
      FIELD  TEXT C'Checks'
                      FONT bhead  ;/* Static text - Checks        */
      FIELD  TEXT C'Check No.'
                      POSITION  1.3 in   CURRENT
                      FONT  head  ;/* Stat text - Check number    */
      FIELD  TEXT C'Date'
                      POSITION  3.2 in   CURRENT
                      FONT  head  ;/* Stat text - Date of check   */
      FIELD  TEXT C'Amount'
                      POSITION  5.0 in   CURRENT
                      FONT  head  ;/* Static text - Amount of check*/
      DRAWGRAPHIC LINE  ACROSS 6.2 IN LINEWT BOLD
                      POSITION 1.3 in next;
   /************************************************/
   /**  ckdata  BODY                              **/
   /************************************************/
   XLAYOUT   ckdata1  BODY  GROUP
                      POSITION SAME NEXT;
      FIELD  START  1 LENGTH 3
                      POSITION 1.5 in  CURRENT
                      FONT  varb  ;/* Variable text - Check number*/
   XLAYOUT   ckdata2  BODY  GROUP   position same same;
      FIELD  START  1 LENGTH 8
                      POSITION  3.0 in  CURRENT
                      FONT  varb  ;/* Variable text - Date        */
   XLAYOUT   ckdata3  BODY  GROUP   position same same;
      FIELD  START  1 LENGTH 8  ALIGN RIGHT
                      POSITION  5.6 in   CURRENT
                      FONT  varb  ;/* Variable text - Amount      */
   /************************************************/
   /** cktotal  BODY                              **/
   /************************************************/
   XLAYOUT   cktotal  BODY  GROUP;
      FIELD  TEXT C'Total Checks'
                      POSITION  1.5 in   .2 in
                      FONT bhead  ;/* Stat text - Total checks    */
      FIELD  START 1 LENGTH 8  ALIGN RIGHT
                      POSITION  7.3 in  CURRENT
                      FONT  varb  ;/* Variable text - Amount      */
      DRAWGRAPHIC LINE  ACROSS 7.5 IN LINEWT BOLD
                      POSITION   0   next;
   /************************************************/
   /** balhead  GROUPHEADER                       **/
   /************************************************/
   XLAYOUT   balhead   GRPHEADER XSPACE .2 in
                      POSITION  SAME .6 in;
      FIELD  TEXT C'Daily'
                      FONT bhead  ;/* Static text - Daily Balance */
      FIELD  TEXT C'Date'
                      POSITION  1.3 in   CURRENT
                      FONT  head  ;/* Stat text - Date of balance */
      FIELD  TEXT C'Balance'
                      POSITION 3.15 in   CURRENT
                      FONT  head  ;/* Static text - Balance       */
      FIELD  TEXT C'Balances'
                      POSITION  0  NEXT
                      FONT bhead  ;/* Static text - Daily Balance */
      DRAWGRAPHIC LINE  ACROSS 6.2 IN LINEWT BOLD
                      POSITION 1.3 in CPOS;
   /************************************************/
   /** baldata  BODY                              **/
   /************************************************/
   XLAYOUT   baldata1  BODY  GROUP
                      POSITION SAME  NEXT;
      FIELD  START 01 LENGTH 8
                      POSITION 1.3 in  CURRENT
                      FONT  varb  ;/* Variable text - Date       */
   XLAYOUT   baldata2  BODY  GROUP  position same same;
      FIELD  START 01 LENGTH 8    ALIGN RIGHT
                      POSITION  3.8 in  CURRENT
                      FONT  varb  ;/* Variable text - Amount     */
   /************************************************/
   /** baltotal BODY                              **/
   /************************************************/
   XLAYOUT   baltotal  BODY  GROUP;
      FIELD  TEXT C'Final Balance'
                      POSITION  1.5 in   .2 in
                      FONT bhead  ;/* Stat text - Final balance  */
      FIELD  START 1 LENGTH 8    ALIGN RIGHT
                      POSITION  7.3 IN CURRENT
                      FONT  varb  ;/* Variable text - Amount     */
   /************************************************/
   /** statrail BODY                              **/
   /************************************************/
   XLAYOUT   statrail  BODY
                  POSITION SAME .4 in;
      DRAWGRAPHIC LINE  ACROSS 7.5 IN LINEWT BOLD
                  POSITION 0 CPOS;
      FIELD  TEXT C'Interest Rate '
              POSITION  2.0 in NEXT
                      FONT bhead ;/* Static text - Interest rate*/
      FIELD  TEXT C'As of 01/04  * * *  5.321%'
              POSITION  CURRENT CURRENT
                      FONT varb ; /* Static text                */
      DRAWGRAPHIC LINE  ACROSS 7.5 IN LINEWT BOLD
             POSITION 0  NEXT
           copy   down 2 spaced 1 mm;
   /************************************************/
   /** pgenum   PAGE NUMBER                       **/
   /************************************************/
   XLAYOUT   pgenum  PAGETRAILER
                  POSITION SAME ABSOLUTE 10.7 in;
      FIELD  TEXT C 'Page '
             POSITION 6.5 in CURRENT
             FONT  varb;          /* placement of page number    */
      FIELD  PAGENUM PRINT        /* request page numbering      */
             FONT  varb           /* placement of page number    */
             POSITION CURRENT CURRENT;