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