Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.60 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  3. <xsl:output method="xml" omit-xml-declaration="yes" indent="no"/>
  4.  
  5. <xsl:template match="/prnItem">
  6. <printData>
  7. <cmd><hex>02</hex>n</cmd> <!-- inch metric-->
  8. <cmd><hex>02</hex>c0055</cmd> <!-- length of the continuous paper-->
  9. <cmd><hex>02</hex>f350</cmd> <!-- sets the tear offposition for using the cutter. -->
  10. <cmd><hex>02</hex>L</cmd> <!-- printing content starts -->
  11. <cmd>D11</cmd> <!-- pixel size in horizontal and vertical direction -->
  12. <cmd>H20</cmd> <!-- sets the head intensity -->
  13. <cmd>C0000</cmd> <!-- offset in direction of columns -->
  14. <cmd>R0000</cmd> <!-- offset in direction of rows -->
  15.  
  16. <text font="C12" row="235" column="25"><db key="XMLBonSpecKlienta"/></text>
  17. <cmd>1X1100002350000L200002</cmd>
  18. <text font="A10" row="215" column="20"><res key="cz.green.billprn.BillPrinter_Item"/>: <xsl:value-of select="billItem/name"/></text>
  19. <text font="A10" row="202" column="20"><res key="cz.green.billprn.BillPrinter_Access"/>: <xsl:value-of select="card/access/name"/></text>
  20. <text font="A8" row="190" column="20"><res key="cz.green.billprn.BillPrinter_ValidForm"/>: <xsl:value-of select="card/validity/from"/></text>
  21. <text font="A8" row="180" column="20"><res key="cz.green.billprn.BillPrinter_ValidTo"/>: <xsl:value-of select="card/validity/to"/></text>
  22.  
  23. <text font="A8" row="170" column="20"><res key="cz.green.billprn.BillPrinter_LicencePlate"/>: <xsl:value-of select="card/licencePlate"/></text>
  24. <text font="A8" row="160" column="20"><res key="cz.green.billprn.BillPrinter_CardNotice"/>: <xsl:value-of select="card/cardNotice"/></text>
  25.  
  26. <xsl:if test="card/type='shortTerm'">
  27. <xsl:if test="card/paid='yes'">
  28. <text font="A8" row="150" column="20"><res key="cz.green.billprn.BillPrinter_Paid"/></text>
  29. </xsl:if>
  30. <xsl:if test="card/paid='no'">
  31. <text font="A8" row="150" column="20"><res key="cz.green.billprn.BillPrinter_NotPaid"/></text>
  32. </xsl:if>
  33. </xsl:if>
  34.  
  35. <xsl:if test="card/type='longTerm'">
  36. <xsl:variable name="space" select="' '"/>
  37. <text font="A8" row="150" column="20"><res key="cz.green.billprn.BillPrinter_Owner"/>: <xsl:value-of select="card/owner/firstName"/><xsl:value-of select="$space"/><xsl:value-of select="card/owner/secondName"/> (<xsl:value-of select="card/owner/distinction"/>)</text>
  38. <xsl:if test="(count(card/reservation/name)!=0) and (card/reservation/name!='')">
  39. <text font="A8" row="140" column="20"><res key="cz.green.billprn.BillPrinter_Reservation"/>: <xsl:value-of select="card/reservation/name"/></text>
  40. </xsl:if>
  41. </xsl:if>
  42.  
  43. <xsl:if test="(card/type='cheque') or (card/type='priceCheque')">
  44.  
  45. <xsl:if test="(count(credit)!=0) and (credit!='')">
  46. <text font="A8" row="150" column="20"><res key="cz.green.billprn.BillPrinter_Credit"/>: <xsl:if test="(round(card/credit div 60) - card/credit div 60) &gt;= 0">
  47. <xsl:value-of select="round(card/credit div 60)-1"/>
  48. </xsl:if>
  49. <xsl:if test="(round(card/credit div 60) - card/credit div 60) &lt; 0">
  50. <xsl:value-of select="round(card/credit div 60)"/>
  51. </xsl:if>:<xsl:value-of select="round(card/credit mod 60)"/>
  52. </text>
  53. </xsl:if>
  54.  
  55. <xsl:if test="(count(saldo)!=0) and (saldo!='')">
  56. <text font="A8" row="150" column="20"><res key="cz.green.billprn.BillPrinter_Saldo"/>: <xsl:value-of select="saldo"/>
  57. </text>
  58. </xsl:if>
  59.  
  60. <xsl:if test="card/paid='yes'">
  61. <text font="A8" row="140" column="20"><res key="cz.green.billprn.BillPrinter_Paid"/></text>
  62. </xsl:if>
  63. <xsl:if test="card/paid='no'">
  64. <text font="A8" row="140" column="20"><res key="cz.green.billprn.BillPrinter_NotPaid"/></text>
  65. </xsl:if>
  66.  
  67. </xsl:if>
  68.  
  69. <xsl:if test="card/type='congress'">
  70. <xsl:if test="(count(card/reservation/name)!=0) and (card/reservation/name!='')">
  71. <text font="A8" row="150" column="20"><res key="cz.green.billprn.BillPrinter_Reservation"/>: <xsl:value-of select="card/reservation/name"/></text>
  72. </xsl:if>
  73. </xsl:if>
  74.  
  75. <xsl:if test="(count(card/group/name)!=0) and (card/group/name!='')">
  76. <text font="A8" row="130" column="20"><res key="cz.green.billprn.BillPrinter_Group"/>: <xsl:for-each select="group"><xsl:value-of select="card/group/name"/><xsl:text>,</xsl:text></xsl:for-each></text>
  77. </xsl:if>
  78.  
  79. <xsl:if test="(count(billItem/notice)!=0) and (billItem/notice!='')">
  80. <text font="A8" row="120" column="20"><res key="cz.green.billprn.BillPrinter_Notice"/>: <xsl:value-of select="billItem/notice"/></text>
  81. </xsl:if>
  82.  
  83. <code showNumber="no" code="J" thick="6" narrow="3" height="65" row="50" column="20"><xsl:value-of select="codeNoCheckSum"/></code>
  84. <text font="A10" row="35" column="40">No: <xsl:value-of select="card/number"/></text>
  85. <cmd>1X1100000330000L200002</cmd>
  86. <text font="A08" row="20" column="30"><db key="Finisher"/></text>
  87. <text font="A08" row="10" column="38">printed: <xsl:value-of select="now"/></text>
  88. <cmd>E</cmd>
  89. </printData>
  90. </xsl:template>
  91.  
  92. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement