home *** CD-ROM | disk | FTP | other *** search
Wrap
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <xsl:template match="/"> <html> <head /> <body> <xsl:for-each select="expense-report"> <table border="0" width="100%"> <tbody> <tr> <td> <table border="0" width="100%"> <tbody> <tr> <td width="220"> <img border="0"> <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">nanonull.gif</xsl:text></xsl:attribute> </img> </td> <td /> <td colspan="2" /> </tr> <tr> <td align="left" colspan="2" rowspan="2" width="502"> <span style="font-size:x-large; font-weight:bold; ">Business Expense Report</span> </td> <td bgcolor="#D2FFFF" colspan="2" valign="bottom"> <span style="font-size:x-small; font-weight:bold; ">Currency: </span> <span style="font-size:x-small; font-weight:bold; "></span> <xsl:for-each select="@currency"> <input style="font-size:x-small; " type="radio"> <xsl:choose> <xsl:when test=".='USD'"> <xsl:attribute name="checked">1</xsl:attribute> </xsl:when> </xsl:choose> </input> <span style="font-size:x-small; ">Dollars</span> </xsl:for-each> <span style="font-size:x-small; "> </span> <xsl:for-each select="@currency"> <input style="font-size:x-small; " type="radio"> <xsl:choose> <xsl:when test=".='Euro'"> <xsl:attribute name="checked">1</xsl:attribute> </xsl:when> </xsl:choose> </input> <span style="font-size:x-small; ">Euros</span> </xsl:for-each> <span style="font-size:x-small; "> </span> <xsl:for-each select="@currency"> <input style="font-size:x-small; " type="radio"> <xsl:choose> <xsl:when test=".='JPY'"> <xsl:attribute name="checked">1</xsl:attribute> </xsl:when> </xsl:choose> </input> <span style="font-size:x-small; ">Yen</span> </xsl:for-each> </td> </tr> <tr> <td bgcolor="#D2FFFF" colspan="2" valign="bottom"> <xsl:for-each select="@detailed"> <input type="checkbox"> <xsl:choose> <xsl:when test=".='true'"> <xsl:attribute name="checked">1</xsl:attribute> </xsl:when> <xsl:when test=".='1'"> <xsl:attribute name="checked">1</xsl:attribute> </xsl:when> </xsl:choose> </input> </xsl:for-each> <span style="font-size:x-small; font-weight:bold; ">Detailed report</span> </td> </tr> </tbody> </table> <table border="0" width="100%"> <tbody> <tr> <td> <xsl:for-each select="Person"> <br /> <table border="0" width="100%"> <tbody> <tr bgcolor="#D2FFFF"> <td style="border-bottom-color:black; border-bottom-style:solid; border-bottom-width:1pt; " align="left" colspan="6"> <span style="font-family:Verdana; font-size:medium; ">Employee Information</span> </td> </tr> <tr> <td height="61" rowspan="2" width="66" /> <td colspan="2" height="61" width="200"> <table border="0" width="400"> <tbody> <tr> <td style="border-color:#D3D3D3; border-style:solid; border-width:1pt; " bgcolor="#F3F3F3" width="100"> <xsl:for-each select="First"> <xsl:apply-templates /> </xsl:for-each> </td> <td style="border-color:#D3D3D3; border-style:solid; border-width:1pt; " bgcolor="#F3F3F3" width="200"> <xsl:for-each select="Last"> <xsl:apply-templates /> </xsl:for-each> </td> </tr> <tr> <td width="133"> <xsl:choose> <xsl:when test="string-length( First ) > 0"> <span style="font-size:x-small; font-weight:bold; ">First Name</span> </xsl:when> <xsl:otherwise> <span style="color:#FF0000; font-size:x-small; font-weight:bold; ">First Name is required</span> </xsl:otherwise> </xsl:choose> </td> <td> <xsl:choose> <xsl:when test="string-length( Last ) > 0"> <span style="font-size:x-small; font-weight:bold; ">Last Name</span> </xsl:when> <xsl:otherwise> <span style="color:#FF0000; font-size:x-small; font-weight:bold; ">Last Name is required</span> </xsl:otherwise> </xsl:choose> </td> </tr> </tbody> </table> </td> <td colspan="2" height="61"> <table border="0" width="250"> <tbody> <tr> <td style="border-color:#D3D3D3; border-style:solid; border-width:1pt; " bgcolor="#F3F3F3" width="200"> <xsl:for-each select="Title"> <xsl:apply-templates /> </xsl:for-each> </td> </tr> <tr> <td width="200"> <span style="font-size:x-small; font-weight:bold; ">Title</span> </td> </tr> </tbody> </table> </td> <td height="61" width="500" /> </tr> <tr> <td colspan="2" height="61" width="200"> <table border="0" width="400"> <tbody> <tr> <td style="border-color:#D3D3D3; border-style:solid; border-width:1pt; " bgcolor="#F3F3F3" width="200"> <xsl:for-each select="Email"> <xsl:apply-templates /> </xsl:for-each> </td> </tr> <tr> <td> <xsl:choose> <xsl:when test="string-length( Email ) > 0"> <span style="font-size:x-small; font-weight:bold; ">E-Mail</span> </xsl:when> <xsl:otherwise> <span style="color:#FF0000; font-size:x-small; font-weight:bold; ">E-Mail is required</span> </xsl:otherwise> </xsl:choose> </td> </tr> </tbody> </table> </td> <td colspan="2" height="61"> <table border="0" width="250"> <tbody> <tr> <td style="border-color:#D3D3D3; border-style:solid; border-width:1pt; " bgcolor="#F3F3F3" width="200"> <xsl:for-each select="Phone"> <xsl:apply-templates /> </xsl:for-each> </td> </tr> <tr> <td> <span style="font-size:x-small; font-weight:bold; ">Phone</span> </td> </tr> </tbody> </table> </td> <td height="61" width="500" /> </tr> </tbody> </table> </xsl:for-each> </td> </tr> <tr> <td> <table border="0" width="100%"> <tbody> <tr> <td style="border-bottom-color:black; border-bottom-style:solid; border-bottom-width:1pt; " bgcolor="#D2FFFF"> <span style="font-family:Verdana; font-size:medium; ">Expense List</span> </td> </tr> </tbody> </table> <xsl:choose> <xsl:when test="contains( @detailed , "true")"> <xsl:for-each select="expense-item"> <xsl:if test="position()=1"> <table border="0" width="100%"> <thead> <tr bgcolor="#C0C0C0"> <td bgcolor="white" width="66" /> <td width="110"> <span style="font-size:x-small; font-weight:bold; ">Type</span> </td> <td width="122"> <span style="font-size:x-small; font-weight:bold; ">Expense To</span> </td> <td width="130"> <span style="font-size:x-small; font-weight:bold; ">Date </span> <span style="font-size:x-small; font-style:italic; font-weight:bold; ">(yyyy-mm-dd)</span> </td> <td width="150"> <span style="font-size:x-small; font-weight:bold; ">Expense</span> </td> <td> <span style="font-size:x-small; font-weight:bold; ">Details</span> </td> <td width="205"> <span style="font-size:x-small; font-weight:bold; ">Description</span> </td> </tr> </thead> <tbody> <xsl:for-each select="../expense-item"> <tr bgcolor="#E0E0E0"> <td bgcolor="white" height="29" width="66" /> <td height="29" width="110"> <xsl:for-each select="@type"> <select size="0"> <option value="Meal"> <xsl:if test=".='Meal'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Meal</option> <option value="Lodging"> <xsl:if test=".='Lodging'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Lodging</option> <option value="Travel"> <xsl:if test=".='Travel'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Travel</option> <option value="Parking"> <xsl:if test=".='Parking'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Parking</option> <option value="Entertainment"> <xsl:if test=".='Entertainment'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Entertainment</option> <option value="Misc"> <xsl:if test=".='Misc'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Misc</option> </select> </xsl:for-each> </td> <td height="29" width="122"> <xsl:for-each select="@expto"> <select size="0"> <option value="Development"> <xsl:if test=".='Development'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Development</option> <option value="Marketing"> <xsl:if test=".='Marketing'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Marketing</option> <option value="Accounting"> <xsl:if test=".='Accounting'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Accounting</option> <option value="Sales"> <xsl:if test=".='Sales'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Sales</option> <option value="Operations"> <xsl:if test=".='Operations'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Operations</option> <option value="Support"> <xsl:if test=".='Support'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Support</option> <option value="IT"> <xsl:if test=".='IT'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>IT</option> </select> </xsl:for-each> </td> <td height="29" width="130"> <xsl:for-each select="Date"> <xsl:apply-templates /> </xsl:for-each> </td> <td align="right" height="29" width="150"> <table border="0" width="100%"> <tbody> <tr> <td align="left"> <xsl:for-each select="expense"> <xsl:apply-templates /> </xsl:for-each> </td> <td align="right"> <xsl:choose> <xsl:when test=" /expense-report/@currency = "USD""> <span style="font-family:Verdana; font-weight:bold; ">$</span> </xsl:when> <xsl:when test=" /expense-report/@currency = "UKP""> <span style="font-family:Verdana; font-weight:bold; ">£</span> </xsl:when> <xsl:when test=" /expense-report/@currency = "Euro""> <span style="font-family:Verdana; font-weight:bold; ">€</span> </xsl:when> <xsl:when test=" /expense-report/@currency = "JPY""> <span style="font-family:Verdana; font-weight:bold; ">¥</span> </xsl:when> <xsl:when test=" /expense-report/@currency = "AUD""> <span style="font-family:Verdana; font-size:x-small; font-weight:bold; ">AU</span> <span style="font-family:Verdana; font-weight:bold; ">$</span> </xsl:when> </xsl:choose> </td> </tr> </tbody> </table> </td> <td align="right"> <xsl:choose> <xsl:when test=" @type = "Meal""> <xsl:for-each select="Meal"> <xsl:for-each select="@mealtype">Meal Type: <select size="0"> <option value="dinner"> <xsl:if test=".='dinner'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>dinner</option> <option value="breakfast"> <xsl:if test=".='breakfast'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>breakfast</option> <option value="lunch"> <xsl:if test=".='lunch'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>lunch</option> <option value="other"> <xsl:if test=".='other'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>other</option> </select> <br /> </xsl:for-each> <xsl:for-each select="Location">Location: <input value=""> <xsl:attribute name="value"><xsl:value-of select="." /></xsl:attribute> </input> </xsl:for-each> </xsl:for-each> </xsl:when> <xsl:when test=" @type = "Lodging""> <xsl:for-each select="Lodging"> <xsl:for-each select="Name">Lodging Name: <input value=""> <xsl:attribute name="value"><xsl:value-of select="." /></xsl:attribute> </input> <br /> </xsl:for-each> <xsl:for-each select="Location">Location: <input value=""> <xsl:attribute name="value"><xsl:value-of select="." /></xsl:attribute> </input> </xsl:for-each> </xsl:for-each> </xsl:when> <xsl:when test=" @type = "Travel""> <xsl:for-each select="Travel"> <xsl:for-each select="@means">Means: <select size="0"> <option value="Taxi"> <xsl:if test=".='Taxi'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Taxi</option> <option value="CharterAir"> <xsl:if test=".='CharterAir'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>CharterAir</option> <option value="Airline"> <xsl:if test=".='Airline'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Airline</option> <option value="Limo"> <xsl:if test=".='Limo'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Limo</option> <option value="CharterSea"> <xsl:if test=".='CharterSea'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>CharterSea</option> <option value="Rail"> <xsl:if test=".='Rail'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Rail</option> <option value="CharterLand"> <xsl:if test=".='CharterLand'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>CharterLand</option> <option value="Bus"> <xsl:if test=".='Bus'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Bus</option> </select> <br /> </xsl:for-each> <xsl:for-each select="Destination">Destination: <input value=""> <xsl:attribute name="value"><xsl:value-of select="." /></xsl:attribute> </input> <br /> </xsl:for-each> <xsl:choose> <xsl:when test=" @means = "Taxi""> <xsl:for-each select="Mileage">Mileage: <input value=""> <xsl:attribute name="value"><xsl:value-of select="." /></xsl:attribute> </input> </xsl:for-each> </xsl:when> <xsl:when test=" @means = "Limo""> <xsl:for-each select="Mileage"> <input value=""> <xsl:attribute name="value"><xsl:value-of select="." /></xsl:attribute> </input> </xsl:for-each> </xsl:when> </xsl:choose> </xsl:for-each> </xsl:when> <xsl:when test=" @type = "Parking""> <xsl:for-each select="Parking"> <xsl:for-each select="Location">Location: <input value=""> <xsl:attribute name="value"><xsl:value-of select="." /></xsl:attribute> </input> </xsl:for-each> </xsl:for-each> </xsl:when> <xsl:when test=" @type = "Entertainment""> <xsl:for-each select="Entertainment"> <xsl:if test="position()=1"> <table border="0"> <thead> <tr> <td style="border-bottom-color:black; border-bottom-style:solid; border-bottom-width:thin; " align="center">Client-name</td> </tr> </thead> <tbody> <xsl:for-each select="../Entertainment"> <tr> <td bgcolor="#F3F3F3"> <xsl:for-each select="Client-name"> <xsl:apply-templates /> </xsl:for-each> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:if> </xsl:for-each> </xsl:when> <xsl:when test="@type = "Misc""> <xsl:for-each select="Misc"> <xsl:for-each select="@misctype">Misc. Type: <select size="0"> <option value="TeamBuilding"> <xsl:if test=".='TeamBuilding'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>TeamBuilding</option> <option value="Tips"> <xsl:if test=".='Tips'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Tips</option> <option value="Fines"> <xsl:if test=".='Fines'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Fines</option> <option value="Rental"> <xsl:if test=".='Rental'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Rental</option> <option value="EverythingElse"> <xsl:if test=".='EverythingElse'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>EverythingElse</option> <option value="Tolls"> <xsl:if test=".='Tolls'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Tolls</option> <option value="Telephone"> <xsl:if test=".='Telephone'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Telephone</option> </select> </xsl:for-each> </xsl:for-each> </xsl:when> </xsl:choose> </td> <td height="29" width="205"> <xsl:for-each select="description"> <div> <xsl:apply-templates /> </div> </xsl:for-each> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:if> </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:for-each select="expense-item"> <xsl:if test="position()=1"> <table border="0"> <thead> <tr bgcolor="#C0C0C0"> <td bgcolor="white" width="66" /> <td width="110"> <span style="font-size:x-small; font-weight:bold; ">Type</span> </td> <td width="122"> <span style="font-size:x-small; font-weight:bold; ">Expense To</span> </td> <td width="130"> <span style="font-size:x-small; font-weight:bold; ">Date </span> <span style="font-size:x-small; font-style:italic; font-weight:bold; ">(yyyy-mm-dd)</span> </td> <td width="150"> <span style="font-size:x-small; font-weight:bold; ">Expense</span> </td> </tr> </thead> <tbody> <xsl:for-each select="../expense-item"> <tr bgcolor="#E0E0E0"> <td bgcolor="white" height="29" width="66" /> <td height="29" width="110"> <xsl:for-each select="@type"> <select size="0"> <option value="Meal"> <xsl:if test=".='Meal'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Meal</option> <option value="Lodging"> <xsl:if test=".='Lodging'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Lodging</option> <option value="Travel"> <xsl:if test=".='Travel'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Travel</option> <option value="Parking"> <xsl:if test=".='Parking'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Parking</option> <option value="Entertainment"> <xsl:if test=".='Entertainment'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Entertainment</option> <option value="Misc"> <xsl:if test=".='Misc'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Misc</option> </select> </xsl:for-each> </td> <td height="29" width="122"> <xsl:for-each select="@expto"> <select size="0"> <option value="Development"> <xsl:if test=".='Development'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Development</option> <option value="Marketing"> <xsl:if test=".='Marketing'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Marketing</option> <option value="Accounting"> <xsl:if test=".='Accounting'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Accounting</option> <option value="Sales"> <xsl:if test=".='Sales'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Sales</option> <option value="Operations"> <xsl:if test=".='Operations'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Operations</option> <option value="Support"> <xsl:if test=".='Support'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>Support</option> <option value="IT"> <xsl:if test=".='IT'"> <xsl:attribute name="selected">1</xsl:attribute> </xsl:if>IT</option> </select> </xsl:for-each> </td> <td height="29" width="130"> <xsl:for-each select="Date"> <xsl:apply-templates /> </xsl:for-each> </td> <td align="right" height="29" width="150"> <table border="0" width="100%"> <tbody> <tr> <td align="left"> <xsl:for-each select="expense"> <xsl:apply-templates /> </xsl:for-each> </td> <td align="right"> <xsl:choose> <xsl:when test=" /expense-report/@currency = "USD""> <span style="font-family:Verdana; font-weight:bold; ">$</span> </xsl:when> <xsl:when test=" /expense-report/@currency = "UKP""> <span style="font-family:Verdana; font-weight:bold; ">£</span> </xsl:when> <xsl:when test=" /expense-report/@currency = "Euro""> <span style="font-family:Verdana; font-weight:bold; ">€</span> </xsl:when> <xsl:when test=" /expense-report/@currency = "JPY""> <span style="font-family:Verdana; font-weight:bold; ">¥</span> </xsl:when> <xsl:when test=" /expense-report/@currency = "AUD""> <span style="font-family:Verdana; font-size:x-small; font-weight:bold; ">AU</span> <span style="font-family:Verdana; font-weight:bold; ">$</span> </xsl:when> </xsl:choose> </td> </tr> </tbody> </table> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:if> </xsl:for-each> </xsl:otherwise> </xsl:choose> </td> </tr> </tbody> </table> <xsl:choose> <xsl:when test="sum(/expense-report/expense-item/expense)>100"> <table border="0" width="100%"> <tbody> <tr> <td align="left" colspan="2" width="153"> <span style="font-size:x-small; ">This expense report has exceeded </span> <span style="font-size:x-small; font-weight:bold; ">100</span> <span style="font-size:x-small; "> </span> <xsl:for-each select="@currency"> <span style="font-size:x-small; "> <xsl:value-of select="." /> </span> </xsl:for-each> <span style="font-size:x-small; "> which under corporate policy requires approval of you direct superior. All forms must be presented in triplicate and be sumitted to the human resouces department server in its current XML form.</span> </td> </tr> <tr> <td style="border-color:#D3D3D3; border-style:solid; border-width:1pt; " height="101" valign="bottom" width="153"> <table border="0" width="100%"> <tbody> <tr> <td /> </tr> <tr> <td>Date</td> </tr> </tbody> </table> </td> <td style="border-color:#D3D3D3; border-style:solid; border-width:1pt; " height="101" valign="bottom"> <table border="0" width="100%"> <tbody> <tr> <td /> </tr> <tr> <td>Signature</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </xsl:when> <xsl:otherwise /> </xsl:choose> </td> </tr> </tbody> </table> </xsl:for-each> </body> </html> </xsl:template> <xsl:template match="italic"> <span style="font-style:italic; "> <xsl:apply-templates /> </span> </xsl:template> <xsl:template match="strong"> <span style="font-weight:bold; "> <xsl:apply-templates /> </span> </xsl:template> </xsl:stylesheet>