Hi All,
i have an XML
<?xml version="1.0" encoding="UTF-8" ?>
<Rowsets DateCreated="2011-02-14T12:24:00" EndDate="2011-02-14T12:24:00" StartDate="2011-02-14T11:24:00" Version="12.0.2 Build(88)">
<Rowset>
<Columns>
<Column Description="BatchNumber" MaxRange="1" MinRange="0" Name="BatchNumber" SQLDataType="12" SourceColumn="BatchNumber" />
<Column Description="VersionCode" MaxRange="1" MinRange="0" Name="VersionCode" SQLDataType="3" SourceColumn="VersionCode" />
<Column Description="MaterialType" MaxRange="1" MinRange="0" Name="MaterialType" SQLDataType="12" SourceColumn="MaterialType" />
<Column Description="LotNumber" MaxRange="1" MinRange="0" Name="LotNumber" SQLDataType="4" SourceColumn="LotNumber" />
<Column Description="RRComplete" MaxRange="1" MinRange="0" Name="RRComplete" SQLDataType="-6" SourceColumn="RRComplete" />
<Column Description="ReviewerName" MaxRange="1" MinRange="0" Name="ReviewerName" SQLDataType="12" SourceColumn="ReviewerName" />
<Column Description="ReviewStartDate" MaxRange="1" MinRange="0" Name="ReviewStartDate" SQLDataType="93" SourceColumn="ReviewStartDate" />
<Column Description="ReviewEndDate" MaxRange="1" MinRange="0" Name="ReviewEndDate" SQLDataType="93" SourceColumn="ReviewEndDate" />
<Column Description="ProjectedEndDate" MaxRange="1" MinRange="0" Name="ProjectedEndDate" SQLDataType="93" SourceColumn="ProjectedEndDate" />
<Column Description="DispositionerName" MaxRange="1" MinRange="0" Name="DispositionerName" SQLDataType="12" SourceColumn="DispositionerName" />
<Column Description="ReceiptDate" MaxRange="1" MinRange="0" Name="ReceiptDate" SQLDataType="93" SourceColumn="ReceiptDate" />
<Column Description="TargetDispositionDate" MaxRange="1" MinRange="0" Name="TargetDispositionDate" SQLDataType="93" SourceColumn="TargetDispositionDate" />
<Column Description="DRComplete" MaxRange="1" MinRange="0" Name="DRComplete" SQLDataType="-6" SourceColumn="DRComplete" />
<Column Description="DispositionedDate" MaxRange="1" MinRange="0" Name="DispositionedDate" SQLDataType="93" SourceColumn="DispositionedDate" />
<Column Description="RecommendedUsageDecision" MaxRange="1" MinRange="0" Name="RecommendedUsageDecision" SQLDataType="12" SourceColumn="RecommendedUsageDecision" />
<Column Description="FinalUsageDecision" MaxRange="1" MinRange="0" Name="FinalUsageDecision" SQLDataType="12" SourceColumn="FinalUsageDecision" />
<Column Description="BatchStatus" MaxRange="1" MinRange="0" Name="BatchStatus" SQLDataType="12" SourceColumn="BatchStatus" />
<Column Description="StockType" MaxRange="1" MinRange="0" Name="StockType" SQLDataType="12" SourceColumn="StockType" />
<Column Description="Plant" MaxRange="1" MinRange="0" Name="Plant" SQLDataType="12" SourceColumn="Plant" />
<Column Description="MaterialNumber" MaxRange="1" MinRange="0" Name="MaterialNumber" SQLDataType="12" SourceColumn="MaterialNumber" />
<Column Description="MaterialDescription" MaxRange="1" MinRange="0" Name="MaterialDescription" SQLDataType="-1" SourceColumn="MaterialDescription" />
<Column Description="DateOfManufacture" MaxRange="1" MinRange="0" Name="DateOfManufacture" SQLDataType="93" SourceColumn="DateOfManufacture" />
<Column Description="ExpiryDate" MaxRange="1" MinRange="0" Name="ExpiryDate" SQLDataType="93" SourceColumn="ExpiryDate" />
<Column Description="QuantityManufactured" MaxRange="1" MinRange="0" Name="QuantityManufactured" SQLDataType="12" SourceColumn="QuantityManufactured" />
<Column Description="BatchComments" MaxRange="1" MinRange="0" Name="BatchComments" SQLDataType="-1" SourceColumn="BatchComments" />
</Columns>
<Row>
<BatchNumber>A12345</BatchNumber>
<VersionCode>1</VersionCode>
<MaterialType>Raw</MaterialType>
<LotNumber>12345</LotNumber>
<RRComplete>0</RRComplete>
<ReviewerName>ankit</ReviewerName>
<ReviewStartDate>2011-02-08T00:00:00</ReviewStartDate>
<ReviewEndDate>2011-02-15T00:00:00</ReviewEndDate>
<ProjectedEndDate>TimeUnavailable</ProjectedEndDate>
<DispositionerName>ankit</DispositionerName>
<ReceiptDate>2011-02-01T00:00:00</ReceiptDate>
<TargetDispositionDate>2011-06-11T00:00:00</TargetDispositionDate>
<DRComplete>0</DRComplete>
<DispositionedDate>TimeUnavailable</DispositionedDate>
<RecommendedUsageDecision>---</RecommendedUsageDecision>
<FinalUsageDecision>---</FinalUsageDecision>
<BatchStatus>---</BatchStatus>
<StockType>---</StockType>
<Plant>PR12</Plant>
<MaterialNumber>A00003434</MaterialNumber>
<MaterialDescription>No breaks</MaterialDescription>
<DateOfManufacture>2010-12-02T00:00:00</DateOfManufacture>
<ExpiryDate>1930-03-05T00:00:00</ExpiryDate>
<QuantityManufactured>69.3454LT</QuantityManufactured>
<BatchComments>---</BatchComments>
</Row>
</Rowset>
</Rowsets>
and i ahve written an xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java">
<xsl:template match="/">
<xsl:apply-templates select="Rowsets/Rowset"/>
</xsl:template>
<xsl:template match="Rowsets/Rowset">
<html>
<head>
<title> In Process Batch Details </title>
<style>
* {
font: 8pt verdana;
}
BODY {
/* Scrollbar setting */
scrollbar-base-color:#3B5E94;
scrollbar-arrow-color:#2F3B47;
scrollbar-darkshadow-color:#45637F;
scrollbar-face-color:#DDE9F5;
scrollbar-highlight-color:#EBFCFF;
scrollbar-shadow-color:#A1BDCB;
scrollbar-track-color:#BBD1E8;
/* Border Setting */
padding: 0px;
margin:0px;
/*Background filter makes problems when scrolling applets and selects*/
background-color: #F6F7FB
}
TABLE{
margin: 0;
padding: 0;
}
.ContentHeaderSection {
border:1px solid #98B1CB;
border-top:1px solid #DFE9F1;
background-color: #BAD2E8;
padding: 5px;
}
.ContentSubTitleBar {
height: 20px;
border:1px solid #98B1CB;
border-top:1px solid #DFE9F1;
background-color: #BAD2E8;
/* OLD: startColorStr=#A8C7E2,endColorStr=#BAD2E8 */
FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#EAF1F6,endColorStr=#BAD2E8);
padding: 5px;
padding-top: 1px;
padding-bottom: 0px;
}
.ContentSubTitle {
color: #000000;
font-weight: bold;
text-decoration: underline;
}
</style>
</head>
<body>
<table cellpadding="0" cellspacing="0" width="100%" height="100%" border="2" class="ContentHeaderSection" >
<tr>
<td>
<table width="60%" height="60%" class="Content" cellspacing="1" cellpadding="4" bordercolor="#FFFFFF" border="2" align="center" style="margin-top:120px;">
<tr>
<th colspan="2" class="ContentSubTitleBar ContentSubTitle">In Process Batch Details
</th>
</tr>
<tr>
<td>
<xsl:for-each select="Columns/Column">
<tr>
<td><xsl:value-of select="@Name"/></td>
<xsl:variable name="BatchDetails" select="@Name" />
<td><xsl:value-of select="../../Row/*[local-name()=$BatchDetails]"/></td>
</tr>
</xsl:for-each>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Now i need a page break for every 5 records and a header and footer in every page.
Can any one tell me how to achieve this using xslt please.