Hi all
If anyone can help me I'd be forever grateful
Let me first explain my situation
[ul][li]I have an XML document (default.xml) that's generated server side[/li]
[li]I have an HTML document (default.html) that's linked to that XML document via id="dsoSomeXML" src="default.xml"[/li]
[li]I have a combo box (or select as it's known by some)
that needs to bound to that XML data source[/li]
[/ul]So, let's say my data source consists of a Unique Field & a Description Field for arguments sake....
I need to fill the combo box up with the Text (in this case HTML SGML & VRML) and assign the unique key the value of the option i.e
Okay, I can achieve the above but it's going to mean mixing code with presentation (I'm using Webclasses & I don't want to embed HTML in my business layer because if I need to make changes I'd have to recompile.
If you're familiar with Webclasses I'll explain
Here's a fragment of my HTML
I then generate the <option> tags in my dll
I'm mixing tiers and going against the concepts of n-tier development.
I can fill my select box using XSL which means keeping Presentation from content but I cannot assign the unique key
Here's a fragment of my XSL
As you can see I use the XSL loop to fill my select box
The question I'm asking is....(sorry I've not been clear)
How can I assign <xsl:value-of select="id"> to <option value = id goes here>???
Please help
thanx
Craig
If anyone can help me I'd be forever grateful
Let me first explain my situation
[ul][li]I have an XML document (default.xml) that's generated server side[/li]
[li]I have an HTML document (default.html) that's linked to that XML document via id="dsoSomeXML" src="default.xml"[/li]
[li]I have a combo box (or select as it's known by some)
that needs to bound to that XML data source[/li]
[/ul]So, let's say my data source consists of a Unique Field & a Description Field for arguments sake....
Code:
<members><data>
<id>1</id>
<description>SGML</description>
</data><data>
<id>2</id>
<description>HTML</description>
</data><data>
<id>3</id>
<description>VRML</description>
</data></members>
Code:
<select datasrc = "#dsoSomeXML" datafld = "members">
<option value = [COLOR=red]Unique key goes here[/color][b]>Description Goes Here[/b]
<option value = [COLOR=red]Unique key goes here[/color][b]>Description Goes Here[/b]
<option value = [COLOR=red]Unique key goes here[/color][b]>Description Goes Here[/b]
</select>
If you're familiar with Webclasses I'll explain
Here's a fragment of my HTML
Code:
.......
<select><WC@options></WC@options></select>
.......
I'm mixing tiers and going against the concepts of n-tier development.
I can fill my select box using XSL which means keeping Presentation from content but I cannot assign the unique key
Here's a fragment of my XSL
Code:
.............
<select id="cboOptions">
<xsl:for-each select="members/data">
<option><xsl:value-of select="description"></xsl:value-of>
</option></xsl:for-each>
</select>
.............
The question I'm asking is....(sorry I've not been clear)
How can I assign <xsl:value-of select="id"> to <option value = id goes here>???
Please help
thanx
Craig