Hi, me again!
ive got an xsl page that takes values from an xml document describing a person and prints them out on screen. what i would like is to press a button and the values/data of the next person in the xml file would be displaye. and also a button to go back the way. the xml is as follows:
thanks for your help
Kenneth Birney
User Interface Programmer
Scottish Police
ive got an xsl page that takes values from an xml document describing a person and prints them out on screen. what i would like is to press a button and the values/data of the next person in the xml file would be displaye. and also a button to go back the way. the xml is as follows:
Code:
<?xml version="1.0"?>
<!-- created by Kenny -->
<?xml-stylesheet type="text/xsl" href="person.xsl"?>
<details xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2000/10/XMLSchema-instance">[/URL]
<person>
<Address>36 Hillpark Avenue Paisley</Address>
<Title>Mr</Title>
<CertNum>F12345</CertNum>
<FirstName>Kenneth</FirstName>
<Gender>Male</Gender>
<LastName>Birney</LastName>
<OtherLastName>none</OtherLastName>
<PreferedName>Kenny</PreferedName>
<Nationality>Scottish</Nationality>
<SCRONumber>123456</SCRONumber>
<Roles>Star</Roles>
<OtherFirstName>God</OtherFirstName>
<DateOfBirth>22/10/1981</DateOfBirth>
<OccupationCode>1</OccupationCode>
<DriverNumber>5</DriverNumber>
</person>
<Person>
<Address>36 Hillpark Avenue Paisley</Address>
<Title>Dr</Title>
<CertNum>F12345</CertNum>
<FirstName>Nick</FirstName>
<Gender>Male</Gender>
<LastName>rivera</LastName>
<OtherLastName>none</OtherLastName>
<PreferedName>Kenny</PreferedName>
<Nationality>Scottish</Nationality>
<SCRONumber>123456</SCRONumber>
<Roles>Star</Roles>
<OtherFirstName>God</OtherFirstName>
<DateOfBirth>22/10/1981</DateOfBirth>
<OccupationCode>1</OccupationCode>
<DriverNumber>5</DriverNumber>
</person>
</details>
the xsl is :
<?xml version="1.0"?>
<!--created by Kenny-->
<xsl:stylesheet version = "1.0" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/TR/WD-xsl">[/URL]
<xsl:template match="/">
<html>
<head>
<script src=" ../VerifyAndSubmit.js"></script>
<script src=" ../dateValidation.js"></script>
<SCRIPT language="JavaScript">
function openBrWindow(theURL,winName,features)
{
window.open(theURL,winName,features);
}
</SCRIPT>
</head>
<body bgcolor="#999999" text="#000000">
<!-- <xsl:apply-templates select="//CertificateModel"/> -->
<!--<xsl:template match="CertificateModel"> -->
<center>
<xsl:element name="Select">
<xsl:attribute name="NAME">status</xsl:attribute>
<xsl:attribute name="size">1</xsl:attribute>
<xsl:element name="option">
<xsl:attribute name="value"><xsl:value-of select="ID"/></xsl:attribute>
<xsl:attribute name="selected"/>
Kenneth Birney
</xsl:element>
<xsl:element name="option">
<xsl:attribute name="value"><xsl:value-of select="ID"/></xsl:attribute>
<xsl:attribute name="selected"/>
Ross Birney
</xsl:element>
<xsl:element name="option">
<xsl:attribute name="value"><xsl:value-of select="ID"/></xsl:attribute>
<xsl:attribute name="selected"/>
Robin Birney
</xsl:element>
</xsl:element>
<xsl:element name="input">
<xsl:attribute name="class">longButton</xsl:attribute>
<xsl:attribute name="type">button</xsl:attribute>
<xsl:attribute name="Value">Previous</xsl:attribute>
<xsl:attribute name="onclick">onClick="history.go(-1)"</xsl:attribute>
</xsl:element>
<xsl:element name="input">
<xsl:attribute name="class">longButton</xsl:attribute>
<xsl:attribute name="type">button</xsl:attribute>
<xsl:attribute name="Value">Next</xsl:attribute>
<xsl:attribute name="onclick"></xsl:attribute>
</xsl:element>
<br></br>
</center>
<xsl:element name="table">
<xsl:attribute name="border">1</xsl:attribute>
<xsl:attribute name="width">75%</xsl:attribute>
<xsl:attribute name="align">center</xsl:attribute>
<tr>
<td height="63">
<div align="center">
<xsl:element name="table">
<xsl:attribute name="border">0</xsl:attribute>
<xsl:attribute name="width">75%</xsl:attribute>
<xsl:attribute name="bordercolor">#CCCCCC</xsl:attribute>
<xsl:attribute name="align">center</xsl:attribute>
<xsl:attribute name="height">100%</xsl:attribute>
<tr>
</tr>
<tr>
<td height="29" width="17%"><b>Name:</b></td>
<td height="29" width="39%">
<div align="left"><font size="5"><xsl:value-of select="/details/FirstName"/></font>
<font size="5"><xsl:value-of select="/details/LastName"/></font></div>
</td>
<td height="29" width="20%"><b>Date of Birth:</b></td>
<td height="29" width="24%"><b> <font size="3"><xsl:value-of select="/details/DateOfBirth"/></font></b></td>
</tr>
<tr>
<td width="17%"><b>Address</b></td>
<td colspan = "3">
<div align="left"><font size="3"><b><xsl:value-of select="/details/Address"/></b></font></div>
</td>
</tr>
</xsl:element>
</div>
</td>
</tr>
</xsl:element>
<br/>
<center>
</center>
<form name="form" method="post" action="">
<br/>
<xsl:element name="table">
<xsl:attribute name="border">0</xsl:attribute>
<xsl:attribute name="width">75%</xsl:attribute>
<xsl:attribute name="align">center</xsl:attribute>
<tr>
<td width="23%" height="31">Title</td>
<td width="25%" height="31">
<input type="text" name="title">
<xsl:attribute name="value"><xsl:value-of select="/details/Title"/></xsl:attribute>
</input>
</td>
<td width="23%">Gender:</td>
<td width="25%">
<xsl:element name="Select">
<xsl:attribute name="NAME">Gender</xsl:attribute>
<xsl:attribute name="size">1</xsl:attribute>
<xsl:element name="option">
<xsl:attribute name="value">Male</xsl:attribute>
<xsl:attribute name="selected"/>
Male
</xsl:element>
<xsl:element name="option">
<xsl:attribute name="value">Female</xsl:attribute>
<xsl:attribute name="selected"/>
Female
</xsl:element>
</xsl:element>
</td>
</tr>
<tr>
<td width="21%" height="31">Last Name:</td>
<td width="31%" height="31">
<input type="text" name="lastName">
<xsl:attribute name="value"><xsl:value-of select="/details/LastName"/></xsl:attribute>
</input>
</td>
<td width="21%" height="31">First Name:</td>
<td width="31%" height="31">
<input type="text" name="firstName">
<xsl:attribute name="value"><xsl:value-of select="/details/FirstName"/></xsl:attribute>
</input>
</td>
</tr>
<tr>
<td width="23%">Other Last Name </td>
<td width="25%">
<input type="text" name="otherLastName">
<xsl:attribute name="value"><xsl:value-of select="/details/OtherLastName"/></xsl:attribute>
</input>
</td>
<td width="21%" height="31">Other First Name:</td>
<td width="31%" height="31">
<input type="text" name="otherFirstName">
<xsl:attribute name="value"><xsl:value-of select="/details/OtherFirstName"/></xsl:attribute>
</input>
</td>
</tr>
<tr>
<td width="21%">Preferred Name:</td>
<td width="31%">
<input type="text" name="preferedName">
<xsl:attribute name="value"><xsl:value-of select="/details/PreferedName"/></xsl:attribute>
</input>
</td>
<td width="21%">Date of birth:</td>
<td width="31%">
<input type="text" name="dateOfBirth">
<xsl:attribute name="value"><xsl:value-of select="/details/DateOfBirth"/></xsl:attribute>
</input>
</td>
</tr>
<tr>
<td width="23%">Nationality: </td>
<td width="25%">
<input type="text" name="nationality">
<xsl:attribute name="value"><xsl:value-of select="/details/Nationality"/></xsl:attribute>
</input>
</td>
<td width="21%" height="31">Occupation Code:</td>
<td width="31%" height="31">
<xsl:element name="Select">
<xsl:attribute name="NAME">Occupation</xsl:attribute>
<xsl:attribute name="size">1</xsl:attribute>
<xsl:element name="option">
<xsl:attribute name="value">1002</xsl:attribute>
<xsl:attribute name="selected"/>
1002
</xsl:element>
<xsl:element name="option">
<xsl:attribute name="value">6061</xsl:attribute>
<xsl:attribute name="selected"/>
6061
</xsl:element>
</xsl:element>
</td>
</tr>
<tr>
<td width="21%">SCRO no:</td>
<td width="31%">
<input type="text" name="scroNo">
<xsl:attribute name="value"><xsl:value-of select="/details/SCRONumber"/></xsl:attribute>
</input>
</td>
<td width="21%" height="31">Driver No:</td>
<td width="31%" height="31">
<input type="text" name="driverNo">
<xsl:attribute name="value"><xsl:value-of select="/details/DriverNumber"/></xsl:attribute>
</input>
</td>
</tr>
<tr>
<td width="21%" height="31">Roles:</td>
<td width="31%" height="31">
<xsl:element name="Select">
<xsl:attribute name="NAME">Roles</xsl:attribute>
<xsl:attribute name="size">1</xsl:attribute>
<xsl:element name="option">
<xsl:attribute name="value">Contact</xsl:attribute>
<xsl:attribute name="selected"/>
Contact
</xsl:element>
<xsl:element name="option">
<xsl:attribute name="value">App</xsl:attribute>
<xsl:attribute name="selected"/>
App
</xsl:element>
</xsl:element>
</td>
</tr>
<tr>
<td width="23%"></td>
<td width="25%"></td>
<td width="21%"></td>
<td width="31%"></td>
</tr>
<tr>
<td width="23%"></td>
<td width="25%"></td>
<tr></tr>
<td width="23%"></td>
<td width="31%">
<xsl:element name="input">
<xsl:attribute name="class">longButton</xsl:attribute>
<xsl:attribute name="type">button</xsl:attribute>
<xsl:attribute name="Value">Add</xsl:attribute>
<xsl:attribute name="onclick">
</xsl:attribute>
</xsl:element>
<xsl:element name="input">
<xsl:attribute name="class">longButton</xsl:attribute>
<xsl:attribute name="type">button</xsl:attribute>
<xsl:attribute name="Value">Del</xsl:attribute>
<xsl:attribute name="onclick">
</xsl:attribute>
</xsl:element>
<td colspan = "3">
<xsl:element name="input">
<xsl:attribute name="class">longButton</xsl:attribute>
<xsl:attribute name="type">button</xsl:attribute>
<xsl:attribute name="Value">Incidents</xsl:attribute>
<xsl:attribute name="onclick">
</xsl:attribute>
</xsl:element>
<xsl:element name="input">
<xsl:attribute name="class">longButton</xsl:attribute>
<xsl:attribute name="type">button</xsl:attribute>
<xsl:attribute name="Value">Application</xsl:attribute>
<xsl:attribute name="onclick">
</xsl:attribute>
</xsl:element>
<xsl:element name="input">
<xsl:attribute name="class">longButton</xsl:attribute>
<xsl:attribute name="type">button</xsl:attribute>
<xsl:attribute name="Value">Certificates</xsl:attribute>
<xsl:attribute name="onclick">
</xsl:attribute>
</xsl:element>
</td>
</td>
</tr>
<tr>
<td width="23%"></td>
<td width="25%"></td>
<td width="21%"></td>
<td width="31%"></td>
</tr>
<tr>
<td width="23%" height="34"></td>
<td colspan="2">
<div align="right">
</div>
</td>
<td width="31%" height="34">
</td>
</tr>
</xsl:element>
<br/>
<br/>
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
thanks for your help
Kenneth Birney
User Interface Programmer
Scottish Police