My XML page is this:
<pre>
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="drilllist.xsl"?>
<table name = 'Deployment' id='DeploymentID' default='Deployment'>
<record>
<field name='DeploymentID'>1</field>
<field name='Deployment'>LAN</field>
</record>
<record>
<field name='DeploymentID'>2</field>
<field name='Deployment'>WAN</field>
</record>
<record>
<field name='DeploymentID'>3</field>
<field name='Deployment'>Internet</field>
</record>
<record>
<field name='DeploymentID'>4</field>
<field name='Deployment'>Stand Alone</field>
</record>
<record>
<field name='DeploymentID'>5</field>
<field name='Deployment'>Mainframe</field>
</record>
<record>
<field name='DeploymentID'>6</field>
<field name='Deployment'>Dial-In</field>
</record>
</table>
</pre>
my XSL style sheet is this:
<pre>
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="
http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html><head><title>TITLE</title></head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="table">
<select multiple="multiple">
<xsl:apply-templates/>
</select>
</xsl:template>
<xsl:template match="record">
<option value=""><xsl:value-of select="field[@name=table:default]"/></option>
</xsl:template>
</xsl:stylesheet>
</pre>
the problem is this:
<pre>
<xsl:template match="record">
<option value="<xsl:value-of select="field[@name=table:id]"/>"><xsl:value-of select="field[@name=table:default]"/></option>
</xsl:template>
</pre>
I realize this template isn't right but if I write it like this I think you can see what I am trying to do. Basically I need the value of the ID field for each as the option value and the default field of each to be the text shown.
In the html select statement (table element) I also want its name and id to be the same as the tables name.
Plz help me. TIA and Cya.