Hello Experts,
Thank you for your past assistance it has been really valuable. I'm making an Alert tool for my companies intranet the business we work in is the call centre industry and we have many different sites.
The alert tool I have created writes an XML file with the details of the various alerts each time the database is updated to cut down on database transaction. 100's of agents making repeated ADO requests on the web server every minute or so would surely cause concurrency problems using MS Access as it's all I can use on the intranet web server, hence the writing of the XML data file. Each time the database is updated.
Writing the file and displaying the Alerts is not the problem for me its the XSL (again) you guys have really helped in the past which has been great so here is what I need to be able to do.
Here is a sample of the XML data file it creates. (which is ok).
<?xml version="1.0" encoding="ISO8859-1" ?>
<?xml-stylesheet type="text/xsl" href="alertxsl.xsl"?>
<alert>
<message>
<product>Whatever Product</product>
<alertinfo>Alert 1</alertinfo>
<alertdetails>This is the alert details for Alert1 </alertdetails>
<status>Open</status>
<createdate>10/01/2002</cr
eatedate>
<msf>YES</msf>
<msfid>1</msfid>
<locationid>1</locationid>
</message>
</alert>
Ok so this is one record in the XML file, you'll note the <locationid>1</locationid>
there could be potentially be other location id's in other records i.e. <locationid>2</locationid>
etc.
So the XML generation is ok its the XSL I want to concentrate on. I would like to pass a query string to the XSL i.e.
<?xml-stylesheet type="text/xsl" href="alertxsl.xsl?locID=1
"?>
I have no problem with this either its the filtering in the XSL to only display the records with the locationID being whatever is passed to it being displayed.
Here is a copy of the XSL I am using also. Sorry its a bit messy.
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="
http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="500px" style=": margin: 0x; background-color: #FFFFFF;">
<xsl:for-each select="alert/message">
<tr onMousedown="this.bgColor=
'lightgrey
'" onMouseout="this.bgColor='
white'" >
<xsl:attribute name="onClick">
<![CDATA[top.parent.frames
['mainFram
e'].alerti
nfo.alertt
ext.value = ']]><xsl:value-of select="alertdetails" /><![CDATA[']]></xsl:attri
bute>
<td width="20%" style="color: windowtext; font-family: menu; font: menu; padding: 1px; padding-left: 5px; padding-right: 5px; cursor: default;"><xsl:value-of select="product"/></td>
<td width="44%" style="color: windowtext; font-family: menu; font: menu; padding: 1px; padding-left: 5px; padding-right: 5px; cursor: default;"><xsl:value-of select="alertinfo"/></td>
<td width="11%" style="color: windowtext; font-family: menu; font: menu; padding: 1px; padding-left: 5px; padding-right: 5px; cursor: default;"><xsl:value-of select="status"/></td>
<td width="17%" style="color: windowtext; font-family: menu; font: menu; padding: 1px; padding-left: 5px; padding-right: 5px; cursor: default;"><xsl:value-of select="createdate"/></td>
<td width="8%" style="color: windowtext; font-family: menu; font: menu; padding: 1px; padding-left: 5px; padding-right: 5px; cursor: default;"><xsl:value-of select="msf"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
So what I would simply like to do is to have the XSL filter the data based on the URL (query string) value that is passed to it. I'm sure that this will be a simple question for you XML / XSL experts to answer.
I thank you in advance for your advice now and in the past. I wish I had taken more time to learn XML / XSL, the way I am deploying this project really requires more knowledge. But the advice that has been given in the past is helping me to understand how XSL works, thanks again