Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.25 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <StockFile>
  3. <Customer>
  4. <Supplier>A</Supplier>
  5. <Currency>US DOLLAR</Currency>
  6. <Deposit>0</Deposit>
  7. <Balance>0</Balance>
  8. <January>0</January>
  9. <February>0</February>
  10. <March>0</March>
  11. <April>0</April>
  12. <May>0</May>
  13. <June>0</June>
  14. <July>62</July>
  15. <August>18</August>
  16. <September>0</September>
  17. <October>0</October>
  18. <November>0</November>
  19. <December>77</December>
  20. <Total>157</Total>
  21. <Notes></Notes>
  22. </Customer>
  23. <Customer>
  24. <Supplier>B</Supplier>
  25. <Currency>Euro</Currency>
  26. <Deposit>0</Deposit>
  27. <Balance>0</Balance>
  28. <January>0</January>
  29. <February>0</February>
  30. <March>0</March>
  31. <April>11</April>
  32. <May>94</May>
  33. <June>0</June>
  34. <July></July>
  35. <August>18</August>
  36. <September>0</September>
  37. <October>0</October>
  38. <November>0</November>
  39. <December></December>
  40. <Total>123</Total>
  41. <Notes></Notes>
  42. </Customer>
  43.  
  44. <?xml version="1.0" encoding="ISO-8859-1"?>
  45.  
  46. <xsl:stylesheet
  47. version="1.0"
  48. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  49. xmlns:fo="http://www.w3.org/1999/XSL/Format"
  50. xmlns:datetime="http://exslt.org/dates-and-times"
  51. xmlns:fmt="http://xml.apache.org/xalan/java/com.ims.fop.Formatting">
  52.  
  53. <xsl:output method="xml"/>
  54.  
  55. <!-- REPORT BODY HEADER-->
  56. <xsl:template name="Body">
  57. <xsl:template match="/">
  58. <fo:block border="solid" border-after-width.conditionality="retain" border-before-width.conditionality="retain">
  59. <fo:table keep-together="auto" table-omit-footer-at-break="true" xsl:use-attribute-sets="normal-text">
  60. <fo:table-column column-width="1.6cm"/>
  61. <fo:table-column column-width="1.6cm"/>
  62. <fo:table-column column-width="1.6cm"/>
  63. <fo:table-column column-width="1.6cm"/>
  64. <fo:table-column column-width="1.6cm"/>
  65. <fo:table-column column-width="1.6cm"/>
  66. <fo:table-column column-width="1.6cm"/>
  67. <fo:table-column column-width="1.6cm"/>
  68. <fo:table-column column-width="1.6cm"/>
  69. <fo:table-column column-width="1.6cm"/>
  70. <fo:table-column column-width="1.6cm"/>
  71. <fo:table-column column-width="1.6cm"/>
  72. <fo:table-column column-width="1.6cm"/>
  73. <fo:table-column column-width="1.6cm"/>
  74. <fo:table-column column-width="1.6cm"/>
  75. <fo:table-column column-width="1.6cm"/>
  76. <fo:table-column column-width="1.6cm"/>
  77. <fo:table-column column-width="1.6cm"/>
  78. <fo:table-header>
  79. <xsl:call-template name="backgroundheader"/>
  80. <fo:table-row xsl:use-attribute-sets="h2">
  81. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Supplier</fo:block></fo:table-cell>
  82. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Deposit/Paid</fo:block></fo:table-cell>
  83. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Bal to Pay</fo:block></fo:table-cell>
  84. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Jan</fo:block></fo:table-cell>
  85. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Feb</fo:block></fo:table-cell>
  86. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Mar</fo:block></fo:table-cell>
  87. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Apr</fo:block></fo:table-cell>
  88. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>May</fo:block></fo:table-cell>
  89. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>June</fo:block></fo:table-cell>
  90. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>July</fo:block></fo:table-cell>
  91. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Aug</fo:block></fo:table-cell>
  92. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Sept</fo:block></fo:table-cell>
  93. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Oct</fo:block></fo:table-cell>
  94. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Nov</fo:block></fo:table-cell>
  95. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Dec</fo:block></fo:table-cell>
  96. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Total</fo:block></fo:table-cell>
  97. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block>Notes</fo:block></fo:table-cell>
  98. </fo:table-row>
  99. <xsl:template match="USHeader"/>
  100. </fo:table-header>
  101. <fo:table-body>
  102. <!--Not sure what to put in this section-->
  103.  
  104. </fo:table-body>
  105. </fo:table>
  106. </fo:block>
  107. </xsl:template >
  108. </xsl:template>
  109.  
  110. <xsl:template name="USHeader">
  111. <fo:table-row xsl:use-attribute-sets="h2">
  112. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  113. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  114. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  115. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  116. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  117. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  118. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  119. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  120. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  121. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  122. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  123. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  124. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  125. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  126. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  127. <fo:table-cell xsl:use-attribute-sets="cell-padding">$<fo:block></fo:block></fo:table-cell>
  128. </fo:table-row>
  129. </xsl:template>
  130.  
  131. <xsl:template name="EUROHeader">
  132. <fo:table-row xsl:use-attribute-sets="h2">
  133. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  134. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  135. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  136. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  137. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  138. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  139. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  140. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  141. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  142. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  143. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  144. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  145. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  146. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  147. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  148. <fo:table-cell xsl:use-attribute-sets="cell-padding"><fo:block></fo:block></fo:table-cell>
  149. </fo:table-row>
  150. </xsl:template>
  151.  
  152. </xsl:stylesheet>
  153.  
  154. <xsl:key name="grpCur" match="Customer" use="Currency"/>
  155.  
  156. <xsl:for-each select="Customer[generate-id(.)=generate-id(key('grpCur', Currency))[1])]">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement