-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfinalorder.xsl
48 lines (47 loc) · 1.43 KB
/
finalorder.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>Order for <xsl:value-of select="/order/@order_date"/></title>
<style>
.container{
width: 80%;
margin:0 auto;
}
thead{
font-weight:bold;
}
</style>
</head>
<body>
<div class="container">
<h1 style="text-align:center">Final Order Report generated for: <xsl:value-of select="/order/@order_date"/></h1>
<table style="width:100%" border="1">
<thead>
<tr>
<td>Item Number</td>
<td>Supplier</td>
<td>Quote</td>
<td>Quantity</td>
<td>ConfirmationNumber</td>
</tr>
</thead>
<tbody>
<xsl:apply-templates select="order/items/item"/>
</tbody>
</table>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="items/item">
<tr>
<td><xsl:value-of select="./itemNumber"/></td>
<td><xsl:value-of select="./supplier"/></td>
<td>$<xsl:value-of select="format-number(./Quote, '#.00')"/></td>
<td><xsl:value-of select="./quantity"/></td>
<td><xsl:value-of select="./confirmationNumber"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>