Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="xml" omit-xml-declaration="yes" indent="no"/>
- <xsl:template match="/prnItem">
- <printData>
- <cmd><hex>02</hex>n</cmd> <!-- inch metric-->
- <cmd><hex>02</hex>c0055</cmd> <!-- length of the continuous paper-->
- <cmd><hex>02</hex>f350</cmd> <!-- sets the tear offposition for using the cutter. -->
- <cmd><hex>02</hex>L</cmd> <!-- printing content starts -->
- <cmd>D11</cmd> <!-- pixel size in horizontal and vertical direction -->
- <cmd>H20</cmd> <!-- sets the head intensity -->
- <cmd>C0000</cmd> <!-- offset in direction of columns -->
- <cmd>R0000</cmd> <!-- offset in direction of rows -->
- <text font="C12" row="235" column="25"><db key="XMLBonSpecKlienta"/></text>
- <cmd>1X1100002350000L200002</cmd>
- <text font="A10" row="215" column="20"><res key="cz.green.billprn.BillPrinter_Item"/>: <xsl:value-of select="billItem/name"/></text>
- <text font="A10" row="202" column="20"><res key="cz.green.billprn.BillPrinter_Access"/>: <xsl:value-of select="card/access/name"/></text>
- <text font="A8" row="190" column="20"><res key="cz.green.billprn.BillPrinter_ValidForm"/>: <xsl:value-of select="card/validity/from"/></text>
- <text font="A8" row="180" column="20"><res key="cz.green.billprn.BillPrinter_ValidTo"/>: <xsl:value-of select="card/validity/to"/></text>
- <text font="A8" row="170" column="20"><res key="cz.green.billprn.BillPrinter_LicencePlate"/>: <xsl:value-of select="card/licencePlate"/></text>
- <text font="A8" row="160" column="20"><res key="cz.green.billprn.BillPrinter_CardNotice"/>: <xsl:value-of select="card/cardNotice"/></text>
- <xsl:if test="card/type='shortTerm'">
- <xsl:if test="card/paid='yes'">
- <text font="A8" row="150" column="20"><res key="cz.green.billprn.BillPrinter_Paid"/></text>
- </xsl:if>
- <xsl:if test="card/paid='no'">
- <text font="A8" row="150" column="20"><res key="cz.green.billprn.BillPrinter_NotPaid"/></text>
- </xsl:if>
- </xsl:if>
- <xsl:if test="card/type='longTerm'">
- <xsl:variable name="space" select="' '"/>
- <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>
- <xsl:if test="(count(card/reservation/name)!=0) and (card/reservation/name!='')">
- <text font="A8" row="140" column="20"><res key="cz.green.billprn.BillPrinter_Reservation"/>: <xsl:value-of select="card/reservation/name"/></text>
- </xsl:if>
- </xsl:if>
- <xsl:if test="(card/type='cheque') or (card/type='priceCheque')">
- <xsl:if test="(count(credit)!=0) and (credit!='')">
- <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) >= 0">
- <xsl:value-of select="round(card/credit div 60)-1"/>
- </xsl:if>
- <xsl:if test="(round(card/credit div 60) - card/credit div 60) < 0">
- <xsl:value-of select="round(card/credit div 60)"/>
- </xsl:if>:<xsl:value-of select="round(card/credit mod 60)"/>
- </text>
- </xsl:if>
- <xsl:if test="(count(saldo)!=0) and (saldo!='')">
- <text font="A8" row="150" column="20"><res key="cz.green.billprn.BillPrinter_Saldo"/>: <xsl:value-of select="saldo"/>
- </text>
- </xsl:if>
- <xsl:if test="card/paid='yes'">
- <text font="A8" row="140" column="20"><res key="cz.green.billprn.BillPrinter_Paid"/></text>
- </xsl:if>
- <xsl:if test="card/paid='no'">
- <text font="A8" row="140" column="20"><res key="cz.green.billprn.BillPrinter_NotPaid"/></text>
- </xsl:if>
- </xsl:if>
- <xsl:if test="card/type='congress'">
- <xsl:if test="(count(card/reservation/name)!=0) and (card/reservation/name!='')">
- <text font="A8" row="150" column="20"><res key="cz.green.billprn.BillPrinter_Reservation"/>: <xsl:value-of select="card/reservation/name"/></text>
- </xsl:if>
- </xsl:if>
- <xsl:if test="(count(card/group/name)!=0) and (card/group/name!='')">
- <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>
- </xsl:if>
- <xsl:if test="(count(billItem/notice)!=0) and (billItem/notice!='')">
- <text font="A8" row="120" column="20"><res key="cz.green.billprn.BillPrinter_Notice"/>: <xsl:value-of select="billItem/notice"/></text>
- </xsl:if>
- <code showNumber="no" code="J" thick="6" narrow="3" height="65" row="50" column="20"><xsl:value-of select="codeNoCheckSum"/></code>
- <text font="A10" row="35" column="40">No: <xsl:value-of select="card/number"/></text>
- <cmd>1X1100000330000L200002</cmd>
- <text font="A08" row="20" column="30"><db key="Finisher"/></text>
- <text font="A08" row="10" column="38">printed: <xsl:value-of select="now"/></text>
- <cmd>E</cmd>
- </printData>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement