Inclusion of XML data in Javascript embedded within XSL

Subject: Inclusion of XML data in Javascript embedded within XSL
From: "Philip McAllister" <pem@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Feb 2000 12:37:48 -0000
I have the following XML:

<data>
    <performance_selection controlname="performanceID">
        <performance_item value="40">Performance Number 1</performance_item>
        <performance_item value="66">Performance Number 2</performance_item>
    </performance_selection>

    <area_selection controlname="areaID">
        <performance controlname="40">
            <seating_area value="57">Seating area 1</seating_area>
            <seating_area value="61">Seating area 2</seating_area>
        </performance>

        <performance controlname="66">
            <seating_area value="107">Seating area A</seating_area>
            <seating_area value="109">Seating area B</seating_area>
            <seating_area value="200">Seating area C</seating_area>
        </performance>
    </area_selection>
</data>

This is rendered server-side by a custom-built java application which uses
XSLT to convert the XML data into HTML.

My problem is the horrible one of needing 2 drop-down boxes to choose the
performance and seating area. I have the javascript to produce dependant
drop-boxes but have no idea how to integrate the data from the XML into the
javascript arrays...

In the first box the user chooses their performance. This then needs to
refresh the second option box to display the available seating areas for
that performance. The HTML form will then return the selected values of
performanceID and areaID back to the application for processing...

I have only been exposed to XSL for a week or so and I would greatly
appreciate it if you could help with this problem.

1: Is it possible?
2: If it is possible, how?

Help, I am going to go bald from pulling my hair out over this one...

--
Phil McAllister
pem@xxxxxxxxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread