Example of a PO with a preprinted form look (po.xml, po.xsl & po.pdf)

fop command
fop.sh -xml po.xml -xsl po.xsl po.pdf


The  XML (po.xml)
<?xml version='1.0'?>
<x xmlns="http://www.ci-inc.com/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Entity>
                <Entity_Name>www.fastenersNOW.com</Entity_Name>
                <Entity_Address_1>108 South Third Street</Entity_Address_1>
                <Entity_Address_2>Suite 4</Entity_Address_2>
                <Entity_CSZ>Bloomingdale, IL 60108</Entity_CSZ>
                <Entity_Phone>(630) 893-4007</Entity_Phone>
                <Entity_Fax>(630) 893-4030</Entity_Fax>
                <Entity_Email>dcowhey@ci-inc.com</Entity_Email>
                <Entity_State_Tax_Number></Entity_State_Tax_Number>
                <Entity_Federal_Tax_Number></Entity_Federal_Tax_Number>
                <Entity_Logo>/u/green/documentconnection/reports/images/OTR.jpg</Entity_Logo>
        </Entity>
        <Style>
                <Green_Bar>#EEEEEE</Green_Bar>
                <Column_Heading>#DDDDDD</Column_Heading>
                <Line_Break>#CCCCCC</Line_Break>
                <Dark_Blue>#000000</Dark_Blue>
        </Style>
        <Header>
                <PO_Number>12531</PO_Number>
                <Orig_PO_Number>12531</Orig_PO_Number>
                <Confirming>NON-CONFIRMING</Confirming>
                <Vendor_Code>141</Vendor_Code>
                <Vendor_Name>Computer Insights Inc</Vendor_Name>
                <Salesperson>Lucy</Salesperson>
                <Terms_Code>N30</Terms_Code>
                <Terms_Name>NET 30 DAYS</Terms_Name>
                <PO_Date>03-22-01</PO_Date>
                <PO_Date_Req>04-01-01</PO_Date_Req>
                <PO_Current_Promised_Date></PO_Current_Promised_Date>
                <PO_Date_Received>03-22-01</PO_Date_Received>
                <Vendor_Sales_Order>45621</Vendor_Sales_Order>
                <FOB></FOB>
                <BO_Text></BO_Text>
                <Total_Quantity>1,025</Total_Quantity>
                <PO_Total>8,057.50</PO_Total>
                <Ship_Via>Bestway</Ship_Via>
                <Customer_PO></Customer_PO>
                <Total_Weight>0</Total_Weight>
                <RFQ_Comment></RFQ_Comment>
                <Special_Notes></Special_Notes>
                <PO_Message>THIS PURCHASE ORDER QUANTITY MAY NOT BE EXCEEDED BY MORE THAN10%.</PO_Message>
                <Entered_By>DEMO2</Entered_By>
                <Bill_To>
                        <Billing_Name>Computer Insights Inc</Billing_Name>
                        <Billing_Address_1></Billing_Address_1>
                        <Billing_Address_2>2145 Gonewary Rd</Billing_Address_2>
                        <Billing_CSZ>Bartlett, IL 60103</Billing_CSZ>
                </Bill_To>
                <Ship_To>
                        <Shipping_Name>www.fastenersNOW.com</Shipping_Name>
                        <Shipping_Address_1>108 South Third Street</Shipping_Address_1>
                        <Shipping_Address_2>Suite 4</Shipping_Address_2>
                        <Shipping_CSZ>Bloomingdale, IL 60108</Shipping_CSZ>
                        <Shipping_Phone>(630) 893-4007</Shipping_Phone>
                        <Shipping_Fax>(630) 893-4030</Shipping_Fax>
                </Ship_To>
        </Header>
        <Detail_Line>
                <Line_Number>1</Line_Number>
                <Product_Code>AXW402-R</Product_Code>
                <Product_Description>PB,RED 40MM MUSHROOM, KEY LOCK,2 N.C</Product_Description>
                <Extra_Description></Extra_Description>
                <Qty_Ord>125</Qty_Ord>
                <Qty_BO>0</Qty_BO>
                <Qty_Received>125</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>14.7900</Unit_Cost>
                <Cost_Extension>1,848.75</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>IDE</Product_Class_Code>
                <Product_Class_Description>IDEC</Product_Class_Description>
                <EDP>W402-R</EDP>
                <Custom_Description>PB,RED 40MM MUSHROOM, KEY LOCK,2 N.C</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment></Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
        <Detail_Line>
                <Line_Number>2</Line_Number>
                <Product_Code>P22LLS27</Product_Code>
                <Product_Description>LEGEND,PLASTIC,RED,EMERG STOP</Product_Description>
                <Extra_Description></Extra_Description>
                <Qty_Ord>100</Qty_Ord>
                <Qty_BO>100</Qty_BO>
                <Qty_Received>0</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>0.4000</Unit_Cost>
                <Cost_Extension>40.00</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>IDE</Product_Class_Code>
                <Product_Class_Description>IDEC</Product_Class_Description>
                <EDP>2LLS27</EDP>
                <Custom_Description>LEGEND,PLASTIC,RED,EMERG STOP</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment></Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
        <Detail_Line>
                <Line_Number>3</Line_Number>
                <Product_Code>ASW3K40</Product_Code>
                <Product_Description>SEL SW,3 POSN, MAINT'D, KEY LK, 4 N.O</Product_Description>
                <Extra_Description>this is a place for an Extra Description</Extra_Description>
                <Qty_Ord>100</Qty_Ord>
                <Qty_BO>0</Qty_BO>
                <Qty_Received>100</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>18.5700</Unit_Cost>
                <Cost_Extension>1,857.00</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>IDE</Product_Class_Code>
                <Product_Class_Description>IDEC</Product_Class_Description>
                <EDP>W3K40</EDP>
                <Custom_Description>SEL SW,3 POSN, MAINT'D, KEY LK, 4 N.O</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment>This is the line comment and it is a variable length. 
This will paragraph and can cause
 the line height to increase. The "green-bar" effect will take this
 into account and stretch with it.</Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
        <Detail_Line>
                <Line_Number>4</Line_Number>
                <Product_Code>ASW210</Product_Code>
                <Product_Description>SEL SW, 2 POSN, MAINT'D, BLACK KNOB, 1 N.O</Product_Description>
                <Extra_Description></Extra_Description>
                <Qty_Ord>200</Qty_Ord>
                <Qty_BO>55</Qty_BO>
                <Qty_Received>145</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>4.5300</Unit_Cost>
                <Cost_Extension>906.00</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>IDE</Product_Class_Code>
                <Product_Class_Description>IDEC</Product_Class_Description>
                <EDP>W210</EDP>
                <Custom_Description>SEL SW, 2 POSN, MAINT'D, BLACK KNOB, 1 N.O</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment></Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
        <Detail_Line>
                <Line_Number>5</Line_Number>
                <Product_Code>ASW3K20</Product_Code>
                <Product_Description>SEL SW, 3 POSN, MAINT'D, KEY LK, 2 N.O</Product_Description>
                <Extra_Description></Extra_Description>
                <Qty_Ord>50</Qty_Ord>
                <Qty_BO>0</Qty_BO>
                <Qty_Received>50</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>12.6300</Unit_Cost>
                <Cost_Extension>631.50</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>IDE</Product_Class_Code>
                <Product_Class_Description>IDEC</Product_Class_Description>
                <EDP>W3K20</EDP>
                <Custom_Description>SEL SW, 3 POSN, MAINT'D, KEY LK, 2 N.O</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment></Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
        <Detail_Line>
                <Line_Number>6</Line_Number>
                <Product_Code>ASW21K10</Product_Code>
                <Product_Description>SEL SW, 2 POSN, SPRING FROM RIGHT, KEY LOCK</Product_Description>
                <Extra_Description></Extra_Description>
                <Qty_Ord>75</Qty_Ord>
                <Qty_BO>0</Qty_BO>
                <Qty_Received>75</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>11.0100</Unit_Cost>
                <Cost_Extension>825.75</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>IDE</Product_Class_Code>
                <Product_Class_Description>IDEC</Product_Class_Description>
                <EDP>W21K10</EDP>
                <Custom_Description>SEL SW, 2 POSN, SPRING FROM RIGHT, KEY LOCK</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment></Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
        <Detail_Line>
                <Line_Number>7</Line_Number>
                <Product_Code>PB-BLACK</Product_Code>
                <Product_Description>PB, BLACK (SILENCE)</Product_Description>
                <Extra_Description></Extra_Description>
                <Qty_Ord>25</Qty_Ord>
                <Qty_BO>15</Qty_BO>
                <Qty_Received>10</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>3.4500</Unit_Cost>
                <Cost_Extension>86.25</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>2</Product_Class_Code>
                <Product_Class_Description>FASTENERS</Product_Class_Description>
                <EDP>-BLACK</EDP>
                <Custom_Description>PB, BLACK (SILENCE)</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment></Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
        <Detail_Line>
                <Line_Number>8</Line_Number>
                <Product_Code>APW1126-R</Product_Code>
                <Product_Description>PILOT LIGHT, RED (ALARM)</Product_Description>
                <Extra_Description></Extra_Description>
                <Qty_Ord>25</Qty_Ord>
                <Qty_BO>25</Qty_BO>
                <Qty_Received>0</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>10.4700</Unit_Cost>
                <Cost_Extension>261.75</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>IDE</Product_Class_Code>
                <Product_Class_Description>IDEC</Product_Class_Description>
                <EDP></EDP>
                <Custom_Description>W1126-R PILOT LIGHT, RED (ALARM)</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment></Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
        <Detail_Line>
                <Line_Number>9</Line_Number>
                <Product_Code>APW1126-A</Product_Code>
                <Product_Description>PILOT LIGHT, AMBER (WARNING)</Product_Description>
                <Extra_Description></Extra_Description>
                <Qty_Ord>100</Qty_Ord>
                <Qty_BO>100</Qty_BO>
                <Qty_Received>0</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>10.4700</Unit_Cost>
                <Cost_Extension>1,047.00</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>IDE</Product_Class_Code>
                <Product_Class_Description>IDEC</Product_Class_Description>
                <EDP></EDP>
                <Custom_Description>W1126-A PILOT LIGHT, AMBER (WARNING)</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment></Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
        <Detail_Line>
                <Line_Number>10</Line_Number>
                <Product_Code>APW1126-G</Product_Code>
                <Product_Description>PILOT LIGHT, GREEN (ON)</Product_Description>
                <Extra_Description></Extra_Description>
                <Qty_Ord>100</Qty_Ord>
                <Qty_BO>0</Qty_BO>
                <Qty_Received>100</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>0.0000</Unit_Cost>
                <Cost_Extension>0.00</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>IDE</Product_Class_Code>
                <Product_Class_Description>IDEC</Product_Class_Description>
                <EDP></EDP>
                <Custom_Description>W1126-G PILOT LIGHT, GREEN (ON)</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment></Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
        <Detail_Line>
                <Line_Number>11</Line_Number>
                <Product_Code>APW1126-W</Product_Code>
                <Product_Description>PILOT LIGHT, WHITE (POWER)</Product_Description>
                <Extra_Description></Extra_Description>
                <Qty_Ord>50</Qty_Ord>
                <Qty_BO>25</Qty_BO>
                <Qty_Received>25</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>10.4700</Unit_Cost>
                <Cost_Extension>523.50</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>IDE</Product_Class_Code>
                <Product_Class_Description>IDEC</Product_Class_Description>
                <EDP></EDP>
                <Custom_Description>W1126-W PILOT LIGHT, WHITE (POWER)</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment></Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
        <Detail_Line>
                <Line_Number>12</Line_Number>
                <Product_Code>P22LLSBB</Product_Code>
                <Product_Description>LEGEND, PLASTIC, (BLANK)</Product_Description>
                <Extra_Description></Extra_Description>
                <Qty_Ord>75</Qty_Ord>
                <Qty_BO>0</Qty_BO>
                <Qty_Received>75</Qty_Received>
                <Quantity_Method>EA</Quantity_Method>
                <Unit_Cost>0.4000</Unit_Cost>
                <Cost_Extension>30.00</Cost_Extension>
                <Receipt_Extension>0.00</Receipt_Extension>
                <Receipt_Cost_Extension>0.00</Receipt_Cost_Extension>
                <Price_Method>EA</Price_Method>
                <Alt_Product_Code></Alt_Product_Code>
                <Alt_Product_Description></Alt_Product_Description>
                <Product_Class_Code>IDE</Product_Class_Code>
                <Product_Class_Description>IDEC</Product_Class_Description>
                <EDP>2LLSBB</EDP>
                <Custom_Description>LEGEND, PLASTIC, (BLANK)</Custom_Description>
                <Original_Promised_Date>04-05-01</Original_Promised_Date>
                <Current_Promised_Date></Current_Promised_Date>
                <Vendor_Part_Number></Vendor_Part_Number>
                <Line_Comment></Line_Comment>
                <Internal_Line_Comment></Internal_Line_Comment>
                <INVN_USER_DEF>
                        <INVN_USER_DEF_1></INVN_USER_DEF_1>
                        <INVN_USER_DEF_2>Y</INVN_USER_DEF_2>
                        <INVN_USER_DEF_3>Y</INVN_USER_DEF_3>
                        <INVN_USER_DEF_4></INVN_USER_DEF_4>
                        <INVN_USER_DEF_5>Y</INVN_USER_DEF_5>
                        <INVN_USER_DEF_6></INVN_USER_DEF_6>
                        <INVN_USER_DEF_7></INVN_USER_DEF_7>
                        <INVN_USER_DEF_8></INVN_USER_DEF_8>
                        <INVN_USER_DEF_9></INVN_USER_DEF_9>
                        <INVN_USER_DEF_10></INVN_USER_DEF_10>
                </INVN_USER_DEF>
        </Detail_Line>
</x>


The  XSLT (po.xsl)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:dc="http://www.ci-inc.com/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes">
<!-- PAGE DIMENSIONS - BEGIN -->
<xsl:variable name="fo:layout-master-set">
 <fo:layout-master-set>
  <fo:simple-page-master master-name="default-page"
                         page-height="11in" 
                         page-width="8.50in" 
                         margin-top="0.25in" 
                         margin-left="0.25in"
                         margin-right="0.25in"
                         margin-bottom="0.25in"> 
<!-- space needed for header & footer tables -->
  <fo:region-body        margin-top="3.6in" 
                         margin-bottom="1.50in"/>
  <fo:region-before extent="9.50in"/> <!-- space needed for header table -->
  <fo:region-after  extent="1.00in"/> <!-- space needed for footer table -->
  <fo:region-start  extent="0.00in"/>
  <fo:region-end    extent="0.00in"/>
  </fo:simple-page-master>
 </fo:layout-master-set>
</xsl:variable>
<!-- PAGE DIMENSIONS - END   -->
<xsl:output version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="no" media-type="text/html" />
<xsl:template match="/">
<fo:root>
<xsl:copy-of select="$fo:layout-master-set" />
<fo:page-sequence master-reference="default-page" initial-page-number="1" format="1">

<!-- HEADER : START -->
 <fo:static-content flow-name="xsl-region-before">
  <fo:block>
   <fo:table table-layout="fixed" space-before.optimum="0pt" height="3.15in">
    <!-- initializes table column -->
    <fo:table-column column-width="2.5in" />
    <fo:table-column column-width="0.7in" />
    <fo:table-column column-width="3.7in" />
    <fo:table-body>
     <fo:table-row>
      <fo:table-cell border-style="solid" border-width="0pt" border-color="#FFFFFF" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="start">
       <fo:block>
        <xsl:for-each select="dc:x/dc:Entity/dc:Entity_Logo">
         <fo:external-graphic space-before.optimum="1pt" space-after.optimum="4pt" width="1.8in" height="0.53in">
          <xsl:attribute name="src">url('<xsl:value-of select="." />')</xsl:attribute>
         </fo:external-graphic>
        </xsl:for-each>
       </fo:block>
       <fo:block font-size="5pt">
          
       </fo:block>
       <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Entity/dc:Entity_Address_1"/>
       </fo:block>
       <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Entity/dc:Entity_Address_2"/>
       </fo:block>     
       <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Entity/dc:Entity_CSZ"/>
       </fo:block>     
       <fo:block font-size="10pt">
        Phone:   <xsl:value-of select="dc:x/dc:Entity/dc:Entity_Phone"/>
       </fo:block>     
       <fo:block font-size="10pt">
        Fax:   <xsl:value-of select="dc:x/dc:Entity/dc:Entity_Fax"/>
       </fo:block>     
      </fo:table-cell>
      <fo:table-cell border-style="solid" border-width="0pt" border-color="#FFFFFF" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="start">
       <fo:block font-size="1pt">
          
       </fo:block>  
       
      </fo:table-cell>
<!-- document header : START -->
  <fo:table-cell border-style="solid" border-width="0pt" border-color="#FFFFFF" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" number-columns-spanned="9" display-align="after" text-align="right">
   <fo:block>
   <fo:table table-layout="fixed" space-before.optimum="1pt" space-after.optimum="2pt">
    <!-- initializes column headings -->
    <fo:table-column column-width="1.5in" />
    <fo:table-column column-width="1.0in" />
    <fo:table-column column-width="1.2in" />
    <fo:table-column column-width="1.0in" /> 
    <fo:table-body>
     <fo:table-row>
          <fo:table-cell border-style="solid" border-width="0pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
           <fo:block font-size="10pt" font-weight="bold">
         
       </fo:block>
          </fo:table-cell>
          <fo:table-cell border-style="solid" border-width="0pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center" number-columns-spanned="3">
           <fo:block font-size="12pt" font-weight="bold" font-family="Helvetica">
        PURCHASE ORDER
       </fo:block>
          </fo:table-cell>
     </fo:table-row>
     <fo:table-row>
          <fo:table-cell border-style="solid" border-width="0pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
           <fo:block font-size="10pt" font-weight="bold">
         
       </fo:block>
          </fo:table-cell>
          <fo:table-cell border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
           <fo:block font-size="10pt" font-weight="bold">
        DATE
       </fo:block>
          </fo:table-cell>
          <fo:table-cell border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
           <fo:block font-size="10pt" font-weight="bold">
        PO NO.
       </fo:block>
          </fo:table-cell> 
          <fo:table-cell border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
           <fo:block font-size="10pt" font-weight="bold">
        PAGE
       </fo:block>
          </fo:table-cell>
     </fo:table-row>
     <fo:table-row>
          <fo:table-cell border-style="solid" border-width="0pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
           <fo:block font-size="10pt" font-weight="bold">
         
       </fo:block>
          </fo:table-cell>
          <fo:table-cell border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
           <fo:block font-size="10pt">
         <xsl:value-of select="dc:x/dc:Header/dc:PO_Date"/>
       </fo:block>
          </fo:table-cell>
          <fo:table-cell border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
           <fo:block font-size="10pt">
         <xsl:value-of select="dc:x/dc:Header/dc:PO_Number"/>
       </fo:block>
          </fo:table-cell>
          <fo:table-cell border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
           <fo:block font-size="10pt">
        <fo:page-number/> of <fo:page-number-citation ref-id="last-page"/>
       </fo:block>
          </fo:table-cell>
     </fo:table-row>
    </fo:table-body>
   </fo:table>
  </fo:block>
 </fo:table-cell>
</fo:table-row>

    <fo:table-row>
     <fo:table-cell height=".950in"> <!-- spacer -->
      <fo:block>
         
      </fo:block>
     </fo:table-cell>
    </fo:table-row>
<!-- bill to and ship to info BEGIN -->
    <fo:table-row>
     <fo:table-cell>
<fo:block font-size="12pt" >
 <fo:table table-layout="fixed" space-before.optimum="1pt" space-after.optimum="2pt">
   <!-- initializes column headings : for bill to/ship to address table -->
   <fo:table-column column-width="0.75in" />
   <fo:table-column column-width="3.55in" />
   <fo:table-column column-width="0.75in" /> 
   <fo:table-column column-width="2.00in" /> 
    <fo:table-body>
     <fo:table-row>
      <!-- bill to - START -->
          <fo:table-cell border-style="solid" border-width="0pt" border-color="#FFFFFF" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="before" text-align="right">
           <fo:block font-size="10pt" font-weight="bold">
        TO:
       </fo:block>
          </fo:table-cell>

          <fo:table-cell border-style="solid" border-width="0pt" border-color="#FFFFFF" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="before" text-align="start">

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Vendor_Sales_Order"/>
           </fo:block>

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Bill_To/dc:Billing_Name"/>
           </fo:block>

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Bill_To/dc:Billing_Address_1"/>
           </fo:block>

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Bill_To/dc:Billing_Address_2"/>
           </fo:block>

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Bill_To/dc:Billing_CSZ"/>
           </fo:block>

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Bill_To/dc:Billing_Country"/>
           </fo:block>

      </fo:table-cell>
      <!-- bill to - END -->

      <!-- ship to - START -->
          <fo:table-cell border-style="solid" border-width="0pt" border-color="#FFFFFF" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="before" text-align="start">
           <fo:block font-size="10pt" font-weight="bold">
        SHIP TO:
       </fo:block>
          </fo:table-cell>

          <fo:table-cell border-style="solid" border-width="0pt" border-color="#FFFFFF" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="before" text-align="start">

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Customer_PO"/>
           </fo:block>

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Ship_To/dc:Shipping_Name"/>
           </fo:block>

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Ship_To/dc:Shipping_Address_1"/>
           </fo:block>

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Ship_To/dc:Shipping_Address_2"/>
           </fo:block>

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Ship_To/dc:Shipping_CSZ"/>
           </fo:block>

           <fo:block font-size="10pt">
        <xsl:value-of select="dc:x/dc:Header/dc:Ship_To/dc:Shipping_Country"/>
           </fo:block>

      </fo:table-cell>
      <!-- ship to - END -->

     </fo:table-row>
    </fo:table-body>
   </fo:table>

  </fo:block>
     </fo:table-cell>
    </fo:table-row>
<!-- bill to and ship to info : END -->

  </fo:table-body>
 </fo:table> 
</fo:block>
<!-- blank preprinted form table : BEGIN -->
  <!-- hdg table start -->
  <fo:block>
   <fo:table table-layout="fixed" space-before.optimum="1pt" space-after.optimum="2pt">
    <fo:table-column column-width="2.0in" />
    <fo:table-column column-width="4.0in" />
    <fo:table-column column-width="1.8in" />
    
    <fo:table-body>
     <fo:table-row>
      <xsl:attribute name="background-color"><xsl:value-of select="/dc:x/dc:Style/dc:Column_Heading"/></xsl:attribute>
      <fo:table-cell border-style="solid" border-width="1pt" border-color="#000000" padding-start="1pt" padding-end="1pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
       <fo:block font-size="8pt" font-weight="bold">
        SALES REP
       </fo:block>
      </fo:table-cell>
      
      <fo:table-cell border-style="solid" border-width="1pt" border-color="#000000" padding-start="1pt" padding-end="1pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
       <fo:block font-size="8pt" font-weight="bold">
        SHIP VIA
       </fo:block>
      </fo:table-cell>
      
      <fo:table-cell border-style="solid" border-width="1pt" border-color="#000000" padding-start="1pt" padding-end="1pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
       <fo:block font-size="8pt" font-weight="bold">
        PLACED BY
       </fo:block>
      </fo:table-cell>
     </fo:table-row>
 <fo:table-row>
      
      <!-- 01 -->
      <fo:table-cell border-style="solid" border-width="1pt" background-color="#FFFFFF" border-color="#000000" padding-start="1pt" padding-end="1pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
       <fo:block font-size="10pt" font-weight="bold">
        <xsl:value-of select="/dc:x/dc:Header/dc:Salesperson_Name"/>
       </fo:block>
      </fo:table-cell>
      <!-- 02 -->
      <fo:table-cell border-style="solid" border-width="1pt" background-color="#FFFFFF" border-color="#000000" padding-start="1pt" padding-end="1pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="center">
       <fo:block font-size="10pt" font-weight="bold">
        <xsl:value-of select="/dc:x/dc:Header/dc:Ship_Via"/>
       </fo:block>
      </fo:table-cell>
      <!-- 03 -->
      <fo:table-cell border-style="solid" border-width="1pt" background-color="#FFFFFF" border-color="#000000" padding-start="1pt" padding-end="1pt" padding-before="2pt" padding-after="2pt" display-align="center" text-align="center">
       <fo:block font-size="10pt" font-weight="bold">
        <xsl:value-of select="/dc:x/dc:Header/dc:Entered_By"/>
       </fo:block>
      </fo:table-cell>
     </fo:table-row>
    </fo:table-body>
   </fo:table>
  </fo:block>

   <!-- hdg table end -->  
   <fo:block>
<fo:table table-layout="fixed" space-before.optimum="0pt" space-after.optimum="0pt">
 <!-- initializes detail column headings : BEGIN -->
 <fo:table-column column-width="0.65in" />
 <fo:table-column column-width="0.35in" />
 <fo:table-column column-width="2.15in" /> 
 <fo:table-column column-width="3.0in" /> 
 <fo:table-column column-width="0.70in" />
 <fo:table-column column-width="0.35in" /> 
 <fo:table-column column-width="0.60in" />
 <!-- initializes detail column headings : END   -->
<fo:table-header>
 <fo:table-row>
  <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="right">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="start">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="start">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="start">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="right">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="right">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="right">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
 </fo:table-row>
</fo:table-header>
<fo:table-body>
 <fo:table-row height="5.5in">
  <fo:table-cell border-bottom-color="#000000" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1px" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="right">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-bottom-color="#000000" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1px" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="right">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-bottom-color="#000000" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1px" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="right">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-bottom-color="#000000" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1px" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="right">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-bottom-color="#000000" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1px" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="right">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-bottom-color="#000000" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1px" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="right">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
  <fo:table-cell border-bottom-color="#000000" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1px" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="right">
   <fo:block font-size="8pt"> </fo:block>
  </fo:table-cell>
 </fo:table-row>
</fo:table-body>
</fo:table>

</fo:block>
<!-- blank preprinted form table : END -->

</fo:static-content>
<!-- HEADER : END -->

<!-- FOOTER - BEGIN -->
<fo:static-content flow-name="xsl-region-after" display-align="after">

<fo:table table-layout="fixed">
<fo:table-column column-width="5.1in"/>
<fo:table-body>
 <fo:table-row>
  <fo:table-cell border-width="0pt" display-align="after" text-align="right" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt">
    <fo:retrieve-marker retrieve-position="last-ending-within-page" retrieve-class-name="po_total_marker" /> 
  </fo:table-cell>
 </fo:table-row>
</fo:table-body>
</fo:table>


<fo:block>
<fo:table table-layout="fixed">
<fo:table-column column-width="7.8in"/>
<fo:table-body>
 <fo:table-row>
  <fo:table-cell border-color="#000000" border-bottom-color="#FFFFFF" border-left-color="#FFFFFF" border-right-color="#FFFFFF" border-style="solid" border-width="1pt" display-align="before" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt">
   <fo:block font-size="10pt">
    Comments:
   </fo:block>
   <fo:block font-size="10pt">
    <xsl:value-of select="dc:x/dc:Header/dc:Special_Notes"/>
   </fo:block>
   <fo:block font-size="6pt">
     
   </fo:block>
   <fo:block font-size="10pt">
    Ship Via: <xsl:value-of select="dc:x/dc:Header/dc:Ship_Via"/>
   </fo:block>
  </fo:table-cell>
 </fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>

</fo:static-content>
<!-- FOOTER - END   -->

<!-- BODY - BEGIN -->
<fo:flow flow-name="xsl-region-body">
 
 <xsl:for-each select="dc:x"> <!-- [REPORT NAME] as seen in XML -->
  <fo:table table-layout="fixed" space-before.optimum="0pt" space-after.optimum="0pt">
   <!-- initializes detail column headings : BEGIN -->
   <fo:table-column column-width="0.65in" />
   <fo:table-column column-width="0.35in" />
   <fo:table-column column-width="2.15in" /> 
   <fo:table-column column-width="3.0in" /> 
   <fo:table-column column-width="0.70in" />
   <fo:table-column column-width="0.35in" /> 
   <fo:table-column column-width="0.60in" />
   <!-- initializes detail column headings : END   -->

<fo:table-header>
 <fo:table-row>
 <xsl:attribute name="background-color"><xsl:value-of select="/dc:x/dc:Style/dc:Column_Heading"/></xsl:attribute>
<!-- 
     #000000 = Black
     #FFFFFF = White
         The following table-cell border attributes set the color of this table cell to black and thickens the bottom to 4 points.
         The top border of the cell below it will overwrite this cell's bottom border if we don't make it thicker.
         This is repeated for all of the table cells used to show column heading descriptions.
-->
      <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="right">
       <fo:block font-size="8pt" font-weight="bold">QTY ORD</fo:block>
      </fo:table-cell>
      <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="start">
       <fo:block font-size="8pt" font-weight="bold">UNIT</fo:block>
      </fo:table-cell>
      <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="start">
       <fo:block font-size="8pt" font-weight="bold">PART #</fo:block>
      </fo:table-cell>
      <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="start">
       <fo:block font-size="8pt" font-weight="bold">DESCRIPTION</fo:block>
      </fo:table-cell>
      <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="right">
       <fo:block font-size="8pt" font-weight="bold">U PRICE</fo:block>
      </fo:table-cell>
      <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="right">
       <fo:block font-size="8pt" font-weight="bold">UNIT</fo:block>
      </fo:table-cell>
      <fo:table-cell border-color="#000000" border-bottom-width="1pt" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" display-align="center" text-align="right">
       <fo:block font-size="8pt" font-weight="bold">TOTAL</fo:block>
      </fo:table-cell>
     </fo:table-row>
    </fo:table-header>
    <!-- Detail Loop : BEGIN -->
    <fo:table-body>
     <xsl:for-each select="dc:Detail_Line"> <!-- [DETAIL LINES] -->
      <fo:table-row keep-together="always">
       <!-- toggle background color of lines : BEGIN -->
       <xsl:if test="position() mod 2 != 0">
        <xsl:attribute name="background-color"><xsl:value-of select="/dc:x/dc:Style/dc:Green_Bar"/></xsl:attribute>
       </xsl:if>
       <xsl:if test="position() mod 2 = 0">
        <xsl:attribute name="background-color">#FFFFFF</xsl:attribute>
       </xsl:if>
       <!-- toggle background color of lines : END -->
<!--
        The following table-cell border attributes set the top border to white and the others to black.
        The top boder overwrites the bottom border of the cell above it so it can't be seen.
                The last row has a visible bottom border because there isn't a white top below it.
                This give us the illusion that we have vertical lines without horizontal lines.
-->

        <fo:table-cell border-bottom-color="#FFFFFF" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1px" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="right">
        <xsl:attribute name="border-top-color"><xsl:value-of select="/dc:x/dc:Style/dc:Line_Break"/></xsl:attribute>
                 <fo:block font-size="8pt">
<!-- special last page footer code : START -->
<!-- This tests for last page and puts information into "last-page-marker" for use with a different footer on the last page -->
<!-- [LAST PAGE] -->
<xsl:choose> 
 <xsl:when test="position() = last()">
  <fo:marker marker-class-name="po_total_marker">
   <fo:block font-size="12pt" font-weight="bold" text-align="right">
   TOTAL OF PURCHASE ORDER = $<xsl:value-of select="/dc:x/dc:Header/dc:PO_Total"/>

   </fo:block>
  </fo:marker>
  </xsl:when> 
 <xsl:otherwise>
  <fo:marker marker-class-name="po_total_marker">
   <fo:block font-size="10pt" font-weight="bold" text-align="right">
    Continued...
   </fo:block>
  </fo:marker>
 </xsl:otherwise>
</xsl:choose>
<!-- special last page footer code : END -->
          <xsl:value-of select="dc:Qty_Ord" />
         </fo:block>
        </fo:table-cell>

        <fo:table-cell border-bottom-color="#FFFFFF" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="start">
        <xsl:attribute name="border-top-color"><xsl:value-of select="/dc:x/dc:Style/dc:Line_Break"/></xsl:attribute>
         <fo:block font-size="8pt">
          <xsl:value-of select="dc:Quantity_Method" />
         </fo:block>
        </fo:table-cell>

        <fo:table-cell border-bottom-color="#FFFFFF" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="start">
        <xsl:attribute name="border-top-color"><xsl:value-of select="/dc:x/dc:Style/dc:Line_Break"/></xsl:attribute>
         <fo:block font-size="8pt">
          <xsl:value-of select="dc:Product_Code" /> 
         </fo:block>
         <fo:block font-size="8pt">
          Alt Part Number:  <xsl:value-of select="dc:Alt_Product_Code" />
         </fo:block>
        </fo:table-cell>

        <fo:table-cell border-bottom-color="#FFFFFF" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="start">
        <xsl:attribute name="border-top-color"><xsl:value-of select="/dc:x/dc:Style/dc:Line_Break"/></xsl:attribute>
         <fo:block font-size="8pt">
          <xsl:value-of select="dc:Custom_Description" />
         </fo:block>
         <fo:block font-size="8pt">
          <xsl:value-of select="dc:Line_Comment" />
         </fo:block>
         <fo:block font-size="8pt">
          <xsl:value-of select="dc:EPD" />
         </fo:block>
        </fo:table-cell>

        <fo:table-cell border-bottom-color="#FFFFFF" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="right">
        <xsl:attribute name="border-top-color"><xsl:value-of select="/dc:x/dc:Style/dc:Line_Break"/></xsl:attribute>
         <fo:block font-size="8pt">
          <xsl:value-of select="dc:Unit_Cost" />
         </fo:block>
        </fo:table-cell>

        <fo:table-cell border-bottom-color="#FFFFFF" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="start">
        <xsl:attribute name="border-top-color"><xsl:value-of select="/dc:x/dc:Style/dc:Line_Break"/></xsl:attribute>
         <fo:block font-size="8pt">
          <xsl:value-of select="dc:Price_Method" />
         </fo:block>
        </fo:table-cell>

        <fo:table-cell border-bottom-color="#FFFFFF" border-left-color="#000000" border-right-color="#000000" border-style="solid" border-width="1pt" padding-start="1pt" padding-end="3pt" padding-before="1pt" padding-after="1pt" text-align="right">
        <xsl:attribute name="border-top-color"><xsl:value-of select="/dc:x/dc:Style/dc:Line_Break"/></xsl:attribute>
         <fo:block font-size="8pt">
          <xsl:value-of select="dc:Cost_Extension" />
         </fo:block>
        </fo:table-cell>

       </fo:table-row>
      </xsl:for-each>
     </fo:table-body>
    </fo:table>
 </xsl:for-each>

  <!-- Detail Loop - END   -->
  <!-- this section prints once after the last detail line -->
  <!--
  <fo:block>
   end of "region-body" document 
  </fo:block>
  -->
<!-- BODY - END   -->
<fo:block id="last-page"/><!-- this is how fop figures out what the last page number is -->

</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
 
Google