EOL fixes to avoid Git warning
This commit is contained in:
@@ -1,64 +1,64 @@
|
||||
|
||||
body { color:black; font-size:10pt; font-family:Tahoma,Helvetica,Arial; }
|
||||
|
||||
a.pageSection:link { color: #ff0000; }
|
||||
a.pageSection:visited { color: #0000ff; }
|
||||
a.pageSection:hover { background: #66ff66; }
|
||||
|
||||
/* a:link { color: #ff0000; } */
|
||||
/* a:visited { color: #0000ff; } */
|
||||
/* a:hover { background: #66ff66; } */
|
||||
|
||||
A {
|
||||
color: #0000FF;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
A:hover { color: #6699cc; text-decoration: underline; }
|
||||
A.urls { color: #0A68B6; text-decoration: none; }
|
||||
A.urls:hover { color: #6699cc; text-decoration: underline; }
|
||||
A.tags { color: #008080; text-decoration: none; }
|
||||
A.tags:hover { color: #6699cc; text-decoration: underline; }
|
||||
|
||||
|
||||
|
||||
table.pagetable td
|
||||
{
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
table.datatable
|
||||
{
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
font-family: Verdana;
|
||||
}
|
||||
|
||||
table.datatable tr th
|
||||
{
|
||||
padding: 2px;
|
||||
border-bottom:1px solid black;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table.datatable tr td
|
||||
{
|
||||
padding: 2px;
|
||||
border-bottom: 1px solid white;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.datatable tr.odd
|
||||
{
|
||||
background-color: #7FFFD4;
|
||||
}
|
||||
|
||||
table.datatable tr.even
|
||||
{
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
||||
table.datatable tr.blank
|
||||
{
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
body { color:black; font-size:10pt; font-family:Tahoma,Helvetica,Arial; }
|
||||
|
||||
a.pageSection:link { color: #ff0000; }
|
||||
a.pageSection:visited { color: #0000ff; }
|
||||
a.pageSection:hover { background: #66ff66; }
|
||||
|
||||
/* a:link { color: #ff0000; } */
|
||||
/* a:visited { color: #0000ff; } */
|
||||
/* a:hover { background: #66ff66; } */
|
||||
|
||||
A {
|
||||
color: #0000FF;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
A:hover { color: #6699cc; text-decoration: underline; }
|
||||
A.urls { color: #0A68B6; text-decoration: none; }
|
||||
A.urls:hover { color: #6699cc; text-decoration: underline; }
|
||||
A.tags { color: #008080; text-decoration: none; }
|
||||
A.tags:hover { color: #6699cc; text-decoration: underline; }
|
||||
|
||||
|
||||
|
||||
table.pagetable td
|
||||
{
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
table.datatable
|
||||
{
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
font-family: Verdana;
|
||||
}
|
||||
|
||||
table.datatable tr th
|
||||
{
|
||||
padding: 2px;
|
||||
border-bottom:1px solid black;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table.datatable tr td
|
||||
{
|
||||
padding: 2px;
|
||||
border-bottom: 1px solid white;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.datatable tr.odd
|
||||
{
|
||||
background-color: #7FFFD4;
|
||||
}
|
||||
|
||||
table.datatable tr.even
|
||||
{
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
||||
table.datatable tr.blank
|
||||
{
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Harbour uHTTPD Server example</title>
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Simple uHTTPD server demo</h1>
|
||||
<br />
|
||||
Examples:
|
||||
<br />
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="testajax.html">Test Ajax</a> (*)
|
||||
</li>
|
||||
<li>
|
||||
<a href="testxmldb.html">Test Ajax XML Database</a> (*)
|
||||
</li>
|
||||
<li>
|
||||
<a href="counter.html">Test Ajax Counter</a> (*) (**)
|
||||
</li>
|
||||
<li>
|
||||
<a href="/serverstatus">Server Status</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/info">Alias to /cgi-bin/info.hrb page with server variables</a> (*)
|
||||
</li>
|
||||
<li>
|
||||
<a href="postsample.html">Post method example</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/cookie">Cookie example</a> (*)
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
(*) Before run these examples, please build files in /uhttpd/modules folder using 'hbmk2 modules.hbp'
|
||||
<br />
|
||||
(**) This example requires libgd package
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Harbour uHTTPD Server example</title>
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Simple uHTTPD server demo</h1>
|
||||
<br />
|
||||
Examples:
|
||||
<br />
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="testajax.html">Test Ajax</a> (*)
|
||||
</li>
|
||||
<li>
|
||||
<a href="testxmldb.html">Test Ajax XML Database</a> (*)
|
||||
</li>
|
||||
<li>
|
||||
<a href="counter.html">Test Ajax Counter</a> (*) (**)
|
||||
</li>
|
||||
<li>
|
||||
<a href="/serverstatus">Server Status</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/info">Alias to /cgi-bin/info.hrb page with server variables</a> (*)
|
||||
</li>
|
||||
<li>
|
||||
<a href="postsample.html">Post method example</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/cookie">Cookie example</a> (*)
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
(*) Before run these examples, please build files in /uhttpd/modules folder using 'hbmk2 modules.hbp'
|
||||
<br />
|
||||
(**) This example requires libgd package
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -254,4 +254,3 @@ function ShowProgress()
|
||||
a.style.display="none";
|
||||
} // if
|
||||
} // ShowProgress
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Harbour uHTTPD Server post example</title>
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Simple uHTTPD server method POST</h1>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<form name=test action="/info" method="post">
|
||||
Type something: <input type="text" name="word">
|
||||
<input type="submit">
|
||||
</form>
|
||||
Pressing button you will redirect to /info page. Look at POST and REQUEST values.
|
||||
<br />You will see a "word" variable name.
|
||||
<br />
|
||||
<br />Return to <a href="/">Main Page</a>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Harbour uHTTPD Server post example</title>
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Simple uHTTPD server method POST</h1>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<form name=test action="/info" method="post">
|
||||
Type something: <input type="text" name="word">
|
||||
<input type="submit">
|
||||
</form>
|
||||
Pressing button you will redirect to /info page. Look at POST and REQUEST values.
|
||||
<br />You will see a "word" variable name.
|
||||
<br />
|
||||
<br />Return to <a href="/">Main Page</a>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Simple Ajax Example</title>
|
||||
<script language="Javascript">
|
||||
|
||||
function xmlhttpPost(strURL)
|
||||
{
|
||||
var xmlHttpReq = false;
|
||||
var self = this;
|
||||
// Mozilla/Safari
|
||||
if ( window.XMLHttpRequest )
|
||||
{
|
||||
self.xmlHttpReq = new XMLHttpRequest();
|
||||
}
|
||||
// IE
|
||||
else if ( window.ActiveXObject )
|
||||
{
|
||||
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
self.xmlHttpReq.open('POST', strURL, true);
|
||||
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
self.xmlHttpReq.onreadystatechange = function()
|
||||
{
|
||||
if ( self.xmlHttpReq.readyState == 4 )
|
||||
{
|
||||
updatepage( self.xmlHttpReq.responseText );
|
||||
}
|
||||
}
|
||||
self.xmlHttpReq.send( getquerystring() );
|
||||
}
|
||||
|
||||
function getquerystring()
|
||||
{
|
||||
var form = document.forms[ 'f1' ];
|
||||
var word = form.word.value;
|
||||
qstr = 'w=' + escape(word); // NOTE: no '?' before querystring
|
||||
return qstr;
|
||||
}
|
||||
|
||||
function updatepage( str )
|
||||
{
|
||||
document.getElementById( "result" ).innerHTML = str;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
This is a simple ajax test. Please type a string in input field and press GO button.
|
||||
<form name="f1">
|
||||
<p>word: <input name="word" type="text">
|
||||
<input value="Go" type="button" onclick='JavaScript:xmlhttpPost("/cgi-bin/testajax.hrb")'></p>
|
||||
<div id="result"></div>
|
||||
</form>
|
||||
Return to <a href="/">Main Page</a>
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Simple Ajax Example</title>
|
||||
<script language="Javascript">
|
||||
|
||||
function xmlhttpPost(strURL)
|
||||
{
|
||||
var xmlHttpReq = false;
|
||||
var self = this;
|
||||
// Mozilla/Safari
|
||||
if ( window.XMLHttpRequest )
|
||||
{
|
||||
self.xmlHttpReq = new XMLHttpRequest();
|
||||
}
|
||||
// IE
|
||||
else if ( window.ActiveXObject )
|
||||
{
|
||||
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
self.xmlHttpReq.open('POST', strURL, true);
|
||||
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
self.xmlHttpReq.onreadystatechange = function()
|
||||
{
|
||||
if ( self.xmlHttpReq.readyState == 4 )
|
||||
{
|
||||
updatepage( self.xmlHttpReq.responseText );
|
||||
}
|
||||
}
|
||||
self.xmlHttpReq.send( getquerystring() );
|
||||
}
|
||||
|
||||
function getquerystring()
|
||||
{
|
||||
var form = document.forms[ 'f1' ];
|
||||
var word = form.word.value;
|
||||
qstr = 'w=' + escape(word); // NOTE: no '?' before querystring
|
||||
return qstr;
|
||||
}
|
||||
|
||||
function updatepage( str )
|
||||
{
|
||||
document.getElementById( "result" ).innerHTML = str;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
This is a simple ajax test. Please type a string in input field and press GO button.
|
||||
<form name="f1">
|
||||
<p>word: <input name="word" type="text">
|
||||
<input value="Go" type="button" onclick='JavaScript:xmlhttpPost("/cgi-bin/testajax.hrb")'></p>
|
||||
<div id="result"></div>
|
||||
</form>
|
||||
Return to <a href="/">Main Page</a>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,90 +1,90 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Part 4 Example</title>
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<link rel="stylesheet" type="text/css" href="/css/base.css" />
|
||||
<script type="text/javascript" src="/js/ajax.js"></script>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
var divpart;
|
||||
|
||||
/**
|
||||
* Requests table data for a specific page.
|
||||
*
|
||||
* @param pageNum the page number to request data for
|
||||
*/
|
||||
function getTableData(pageNum)
|
||||
{
|
||||
xslGet( "/xsl/based.xsl" );
|
||||
xmlGet( '/cgi-bin/tableservletdb.hrb?page=' + pageNum + "&sid=" + Math.random(), tableResponseHandler);
|
||||
divpart = 'tableSection';
|
||||
}
|
||||
|
||||
function getTablePages()
|
||||
{
|
||||
xslGet( "/xsl/basep.xsl" );
|
||||
xmlGet( '/cgi-bin/tableservletdb.hrb?count=true' + "&sid=" + Math.random(), tableResponseHandler);
|
||||
divpart = 'pageSection';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handler for server's response to table requests.
|
||||
* Table content is pulled from response XML and a HTML
|
||||
* table is built. The table is then inserted into the
|
||||
* 'tableSection' DIV.
|
||||
*/
|
||||
function tableResponseHandler()
|
||||
{
|
||||
// Make sure the request is loaded (readyState = 4)
|
||||
if (req.readyState == 4)
|
||||
{
|
||||
// Make sure the status is "OK"
|
||||
if (req.status == 200)
|
||||
{
|
||||
// shutdown Ajax loading progress
|
||||
EndProgress();
|
||||
|
||||
// Make sure the XSL document is loaded
|
||||
if (!xsldocloaded)
|
||||
{
|
||||
alert('Unable to transform data. XSL is not yet loaded.');
|
||||
// break out of the function
|
||||
return;
|
||||
}
|
||||
|
||||
// transform
|
||||
//document.write( xsldoc );
|
||||
combine_XLM_XSLT_HTML( req, xsldoc, document, divpart );
|
||||
|
||||
xsldocloaded = null;
|
||||
xsldoc = null;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("There was a problem retrieving the XML data:\n" +
|
||||
req.statusText);
|
||||
}
|
||||
}
|
||||
}
|
||||
// ]]>
|
||||
</script>
|
||||
</head>
|
||||
<body onload="getTablePages()">
|
||||
<big>Simple XML servlet</big>
|
||||
<br />
|
||||
<br />Tested with IE6+, Firefox 2+ and Opera 9+. Not working with Google Chrome, Safari.
|
||||
<br />Please note that tableservletdb.prg simulates a slow reply of 0.5 seconds.
|
||||
If you want to check real speed please comment #define SIMULATE_SLOW_REPLY in source.
|
||||
<br />Return to <a href="/">Main Page</a>
|
||||
<br />
|
||||
<br />Select a Page
|
||||
<div style="border: 1px solid black; padding: 10px;" id="pageSection"> </div>
|
||||
<br />
|
||||
|
||||
<div style="border: 1px solid black; padding: 10px;" id="tableSection"> </div>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Part 4 Example</title>
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<link rel="stylesheet" type="text/css" href="/css/base.css" />
|
||||
<script type="text/javascript" src="/js/ajax.js"></script>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
var divpart;
|
||||
|
||||
/**
|
||||
* Requests table data for a specific page.
|
||||
*
|
||||
* @param pageNum the page number to request data for
|
||||
*/
|
||||
function getTableData(pageNum)
|
||||
{
|
||||
xslGet( "/xsl/based.xsl" );
|
||||
xmlGet( '/cgi-bin/tableservletdb.hrb?page=' + pageNum + "&sid=" + Math.random(), tableResponseHandler);
|
||||
divpart = 'tableSection';
|
||||
}
|
||||
|
||||
function getTablePages()
|
||||
{
|
||||
xslGet( "/xsl/basep.xsl" );
|
||||
xmlGet( '/cgi-bin/tableservletdb.hrb?count=true' + "&sid=" + Math.random(), tableResponseHandler);
|
||||
divpart = 'pageSection';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handler for server's response to table requests.
|
||||
* Table content is pulled from response XML and a HTML
|
||||
* table is built. The table is then inserted into the
|
||||
* 'tableSection' DIV.
|
||||
*/
|
||||
function tableResponseHandler()
|
||||
{
|
||||
// Make sure the request is loaded (readyState = 4)
|
||||
if (req.readyState == 4)
|
||||
{
|
||||
// Make sure the status is "OK"
|
||||
if (req.status == 200)
|
||||
{
|
||||
// shutdown Ajax loading progress
|
||||
EndProgress();
|
||||
|
||||
// Make sure the XSL document is loaded
|
||||
if (!xsldocloaded)
|
||||
{
|
||||
alert('Unable to transform data. XSL is not yet loaded.');
|
||||
// break out of the function
|
||||
return;
|
||||
}
|
||||
|
||||
// transform
|
||||
//document.write( xsldoc );
|
||||
combine_XLM_XSLT_HTML( req, xsldoc, document, divpart );
|
||||
|
||||
xsldocloaded = null;
|
||||
xsldoc = null;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("There was a problem retrieving the XML data:\n" +
|
||||
req.statusText);
|
||||
}
|
||||
}
|
||||
}
|
||||
// ]]>
|
||||
</script>
|
||||
</head>
|
||||
<body onload="getTablePages()">
|
||||
<big>Simple XML servlet</big>
|
||||
<br />
|
||||
<br />Tested with IE6+, Firefox 2+ and Opera 9+. Not working with Google Chrome, Safari.
|
||||
<br />Please note that tableservletdb.prg simulates a slow reply of 0.5 seconds.
|
||||
If you want to check real speed please comment #define SIMULATE_SLOW_REPLY in source.
|
||||
<br />Return to <a href="/">Main Page</a>
|
||||
<br />
|
||||
<br />Select a Page
|
||||
<div style="border: 1px solid black; padding: 10px;" id="pageSection"> </div>
|
||||
<br />
|
||||
|
||||
<div style="border: 1px solid black; padding: 10px;" id="tableSection"> </div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,74 +1,74 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="html" omit-xml-declaration="yes" indent="no"/>
|
||||
|
||||
<xsl:variable name="numCols" select="count(table/header/cell)" />
|
||||
<xsl:variable name="numToPad" select="23 - count(table/row)" />
|
||||
<xsl:template match="/">
|
||||
|
||||
<!-- start Data Section table -->
|
||||
<table cellspacing="0" cellpadding="0" class="datatable">
|
||||
|
||||
<tr>
|
||||
|
||||
<xsl:for-each select="table/header/cell">
|
||||
<th><xsl:value-of select="." /></th>
|
||||
</xsl:for-each>
|
||||
|
||||
</tr>
|
||||
|
||||
<xsl:if test="count(table/row) = 0">
|
||||
<tr class="blank">
|
||||
<td width="100%" colspan="{$numCols}" align="center" style="font-style: italic; padding:10px;">No Records Found</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:for-each select="table/row">
|
||||
<xsl:variable name="rowClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2">even</xsl:when>
|
||||
<xsl:otherwise>odd</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<tr class="{$rowClass}">
|
||||
<xsl:call-template name="buildCell">
|
||||
<xsl:with-param name="rowNode" select="." />
|
||||
</xsl:call-template>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:call-template name="padding">
|
||||
<xsl:with-param name="max_count" select="$numToPad"/>
|
||||
<xsl:with-param name="counter" select="'0'"/>
|
||||
</xsl:call-template>
|
||||
|
||||
</table>
|
||||
<!-- end Data Section table -->
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="buildCell">
|
||||
<xsl:param name="rowNode"/>
|
||||
|
||||
<xsl:for-each select="/table/header/cell">
|
||||
<xsl:variable name="colName" select="@key" />
|
||||
<td><xsl:value-of select="$rowNode/*[@key=$colName]" disable-output-escaping="yes"/> </td>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="padding">
|
||||
<xsl:param name="max_count"/>
|
||||
<xsl:param name="counter"/>
|
||||
<xsl:if test="$counter < $max_count">
|
||||
<tr class="blank">
|
||||
<td colspan="{$numCols + 1}"> </td>
|
||||
</tr>
|
||||
<xsl:call-template name="padding">
|
||||
<xsl:with-param name="max_count" select="$max_count"/>
|
||||
<xsl:with-param name="counter" select="$counter + 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="html" omit-xml-declaration="yes" indent="no"/>
|
||||
|
||||
<xsl:variable name="numCols" select="count(table/header/cell)" />
|
||||
<xsl:variable name="numToPad" select="23 - count(table/row)" />
|
||||
<xsl:template match="/">
|
||||
|
||||
<!-- start Data Section table -->
|
||||
<table cellspacing="0" cellpadding="0" class="datatable">
|
||||
|
||||
<tr>
|
||||
|
||||
<xsl:for-each select="table/header/cell">
|
||||
<th><xsl:value-of select="." /></th>
|
||||
</xsl:for-each>
|
||||
|
||||
</tr>
|
||||
|
||||
<xsl:if test="count(table/row) = 0">
|
||||
<tr class="blank">
|
||||
<td width="100%" colspan="{$numCols}" align="center" style="font-style: italic; padding:10px;">No Records Found</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:for-each select="table/row">
|
||||
<xsl:variable name="rowClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2">even</xsl:when>
|
||||
<xsl:otherwise>odd</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<tr class="{$rowClass}">
|
||||
<xsl:call-template name="buildCell">
|
||||
<xsl:with-param name="rowNode" select="." />
|
||||
</xsl:call-template>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:call-template name="padding">
|
||||
<xsl:with-param name="max_count" select="$numToPad"/>
|
||||
<xsl:with-param name="counter" select="'0'"/>
|
||||
</xsl:call-template>
|
||||
|
||||
</table>
|
||||
<!-- end Data Section table -->
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="buildCell">
|
||||
<xsl:param name="rowNode"/>
|
||||
|
||||
<xsl:for-each select="/table/header/cell">
|
||||
<xsl:variable name="colName" select="@key" />
|
||||
<td><xsl:value-of select="$rowNode/*[@key=$colName]" disable-output-escaping="yes"/> </td>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="padding">
|
||||
<xsl:param name="max_count"/>
|
||||
<xsl:param name="counter"/>
|
||||
<xsl:if test="$counter < $max_count">
|
||||
<tr class="blank">
|
||||
<td colspan="{$numCols + 1}"> </td>
|
||||
</tr>
|
||||
<xsl:call-template name="padding">
|
||||
<xsl:with-param name="max_count" select="$max_count"/>
|
||||
<xsl:with-param name="counter" select="$counter + 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -1,24 +1,24 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="html" omit-xml-declaration="yes" indent="no"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
|
||||
<!-- start Data Section table -->
|
||||
<table cellspacing="0" cellpadding="0" class="pagetable">
|
||||
|
||||
<tr>
|
||||
|
||||
<xsl:for-each select="pages/page">
|
||||
<td>
|
||||
<xsl:variable name="pagenumber"><xsl:value-of select="." /></xsl:variable>
|
||||
<a class="pageSection" href="javascript: getTableData({$pagenumber});"><xsl:value-of select="$pagenumber" />
|
||||
</a>
|
||||
</td>
|
||||
</xsl:for-each>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="html" omit-xml-declaration="yes" indent="no"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
|
||||
<!-- start Data Section table -->
|
||||
<table cellspacing="0" cellpadding="0" class="pagetable">
|
||||
|
||||
<tr>
|
||||
|
||||
<xsl:for-each select="pages/page">
|
||||
<td>
|
||||
<xsl:variable name="pagenumber"><xsl:value-of select="." /></xsl:variable>
|
||||
<a class="pageSection" href="javascript: getTableData({$pagenumber});"><xsl:value-of select="$pagenumber" />
|
||||
</a>
|
||||
</td>
|
||||
</xsl:for-each>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
Reference in New Issue
Block a user