Dear every one,
Im trying to do paging in xsl , my requirement is
exactly as stated below.
i have a xml file companymaster.xml:
<?xml version="1.0" encoding="utf-8" ?>
<Company>
<companyinfo>
<Company-Name>Techworld</Company-Name>
<House-No>52, Milmead</House-No>
<City>Totenham Hale</City>
<Zip>H43UQ</Zip>
.........
</companyinfo>
<Products>
<category>Dress</category>
<itemno>101</itemno>
<name>Victoria frok</name>
<showonweb>1</showonweb>
........
</products>
<Products>
<category>Automobiles</category>
<itemno>201</itemno>
<name>BMW</name>
<showonweb>0</showonweb>
.......
</products>
<Products>
<category>Models</category>
<itemno>101</itemno>
<name>Running girl</name>
<showonweb>1</showonweb>
.......
</products>
...........n number of products tag goes here
</company>
please note there may be NO <products> tag atall or n
number of products in xml as this xml is dynamically
built in the back end.
now all i want is only display products which is
having the value '1'for <showonweb> and only 4
products per page and want to provide next and
previous buttons to navigate and look at all the
n number of products. and i want to write this code in xslpage
called product.xsl
i got one more html file named product.htm which looks exactly like this
which does nothing but transform the xsl to
html.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual
Studio.NET 7.0">
</head>
<body>
<script language="javascript">
xmlDoc=new ActiveXObject("microsoft.xmldom");
xmlDoc.async=false;
xmlDoc.load("companymaster1.xml");
xslDoc=new ActiveXObject("microsoft.xmldom");
xslDoc.async=false;
xslDoc.load("Product.xsl");
document.write (xmlDoc.transformNode(xslDoc));
</script>
</body>
</html>
i tried my level best to contact many forums and
people to help me i did get some bits of code but i
couldnt solve the problem as of my own with those
sample codes, dint know where to write them and call
them and im new to this xsl concepts and theories and
do not know much about xsl.
i want some help to do this paging work as i intend
to.
i would appreciate if u can provide me the exact xsl
style sheet code for this kind of paging.
im trying to do this for more than a week and under
great pressure at work to finish off, please helpme and provide me
the exact code ,so that there is noneed for me to make
any changes.
thank u very much in advance
murugan