RE: [xsl] interdependant dropdown lists

Subject: RE: [xsl] interdependant dropdown lists
From: cknell@xxxxxxxxxx
Date: Mon, 16 Aug 2004 10:38:50 -0400
Depending on your browser, you could use VBScript or Perl or any other supported scripting language. But I suspect that isn't an answer to your real question. If I understand your question, then your real problem is that you don't have a grasp of where XSLT fits into your process. XSLT is a means of transforming an XML document into some other type of document (e.g., XML, HTML, text, RTF).

In your case it appears that you want to transform an XML document into an HTML document. When the transformation is complete and the document has been serialized, the job of the XSLT processor is done. What happens after that is out of its hands. Anything that goes on between the user and the browser will be handled either by a client-side script or a server-side program or script or what not. If you want to involve XSLT in this, then you will have to create a new instance of the XSLT processor at the appropriate locale (browser or server) and submit an XML document for processing.

I think this means that the real answer to your question is, "No." You will have to use some form of programming to invoke the XSLT processor or to manipulate the HTML objects directly.
--
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     Matt Rich <mattaios@xxxxxxxxxx>
Sent:     Mon, 16 Aug 2004 16:24:59 +0200
To:       Louis Jones <lmj@xxxxxxxxxx>;xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  [xsl] interdependant dropdown lists


Hi!


I want do build a sytem of two dropdown lists in which the result of the first selection will determine which set of values is proposed in the second one.

I cannot catch the value of the first selection in a variable, because it needs to be changed by the user.,
So I chose to use a key and its parameter.


<xsl:key name="GrouperParNbAttr" match="requetes/requetespredef/requete" use="count(attributes/attribute)"/>
<xsl:param name="reqid" select="@id" />


This must give me the dropdown list of all requests which have a certain number of conditions, and the id of these requests as parameters

<form name="selectreq">
        <select size="1" name="requete">
      <xsl:for-each select="key('GrouperParNbAttr',1 )">
            <option> <xsl:value-of select="name"/></option>
      </xsl:for-each>
        </select>
        </form>

Once the user has chosen a request by clicking on it, its id should be displayed:

<td ><font size="1" >
<b>ID </b>  <xsl:value-of select="$reqid"/>
</font></td>

.and the user must be given the choice between the conditions that correspond to the request.

Is it possible without using Javascript?

Many thanks for any piece of info

Matt

Current Thread