Re: [xsl] Re: Getting output from a dropdown (Spry) menu?

Subject: Re: [xsl] Re: Getting output from a dropdown (Spry) menu?
From: "Keith Hughes" <keithihughes@xxxxxxxxx>
Date: Thu, 22 Nov 2007 17:54:26 +0000
Hi again,
Sorry for not posting enough info. I'm new to both XSLT and this message board.
Here's the XML that I'm currently using (it's a sample XML from a
website tutorial):

<?xml version="1.0" encoding="iso-8859-1"?>
<company>
<department name="Research &amp; Development">
  <employee>
    	<name>John Doe</name>
		<job>Software Analyst</job>
    	<salary>2000</salary>
  </employee>
  <employee>
    	<name>Jane Fletcher</name>
    	<job>Designer</job>
		<salary>2500</salary>
  </employee>
  <employee>
    	<name>Chris Benton</name>
    	<job>Programmer</job>
		<salary>3100</salary>
  </employee>
    <employee>
    	<name>Ben Walker</name>
    	<job>Programmer</job>
		<salary>2800</salary>
  </employee>
</department>
<department name="Marketing">
  <employee>
    	<name>George Palmer</name>
    	<job>Copywriter</job>
		<salary>2530</salary>
  </employee>
  <employee>
    	<name>Tony Norberto</name>
		<job>Content Editor</job>
    	<salary>1900</salary>
  </employee>
  <employee>
    	<name>Adrian Segata</name>
    	<job>Marketing Manager</job>
		<salary>5000</salary>
  </employee>
</department>
</company>

I want to have a drop down menu for <job> and a drop down menu for
<salary>. By selecting the menus, it should show me the relevant
<name> (in a list).

We've got a copy of Dreamweaver CS3 and it looked like XSLT would be
the easiest way to go about this.

Also, this will all eventually be contained on a hard drive. I just
wanted a front end that would allow users to search through the XML.

I hope that's enough info, and if there is an XSLT solution that would
be great, however, it looks like I may have to use something else.
Pointers in the right direction would be really good.

Thanks again,

Keith

On 22/11/2007, David Carlisle <davidc@xxxxxxxxx> wrote:
>
> > Thanks for any help on this....
>
> You appear to be expecting that XSLT can act on  the current state of a
> drop down list in a web page. It can not. The XSLT process has finished
> (conceptually at least) before the browser renders the page.
>
> The model is
>
> You have some XML input (in a form that you have not yet shown us).
>
> XSLT converts that input to HTML.
>
> The browser renders the HTML.
>
> So, any questions about how to get the browser to display or act on
> mouse interaction, are purely a matter of html/javascript. If you said
> what HTML/javascript you needed in the output file, and what your input
> looked like, then someone mightbe able to suggest some XSLT.
>
> When you do post XML please try to post the actual (but small) XML not
> the view of XML as shown by your browser, which can't be used for
> testing any possible solutions due to the fact that it's not valid XSLT
> (or even well formed XML)
>
> " <!DOCTYPE xsl:stylesheet (View Source for full doctype...)>"
>
> would not get past an XMl parser and all the + and -
>
> > - <xsl:template match="/">
> > - <html xmlns="http://www.w3.org/1999/xhtml";
>
>
> David
>
> ________________________________________________________________________
> The Numerical Algorithms Group Ltd is a company registered in England
> and Wales with company number 1249803. The registered office is:
> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
>
> This e-mail has been scanned for all viruses by Star. The service is
> powered by MessageLabs.
> ________________________________________________________________________

Current Thread