[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: Multiple select listbox as parameter

Subject: Re: Re: Multiple select listbox as parameter
From: <mfreeman@xxxxxxxxxxxx>
Date: Fri, 10 Mar 2006 21:11:46 -0500
listbox innerhtml
I've almost got it. (I think)

Here is the xsl:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1">
<xsl:param name="lstGroup"/>
<xsl:template match="*">
		
<table>
<tr>
<xsl:for-each select="Indicator[Group/@KEY = $lstGroup]">
<td>
<xsl:value-of select="@Name"/>
</td>
</xsl:for-each>
</tr>
</table>
</xsl:template>
	
<xsl:template match="Indicator">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:transform>

Then on my html page, I have this call:

var oParams = getSyncDom();
oParams.loadXML("<KEYS/>");	
for (var i = 0; i < arrCountry.length; i++){
(oParams.documentElement.appendChild(oParams.createElement("KEY"))).text = arrCountry[i];
}
oProc.addParameter("lstGroup", oParams.documentElement.selectNodes("KEY"));
oProc.transform();
alert(oProc.output);
displayarea.innerHTML = oProc.output;

Now, on the alert box, I get pretty much what I'm looking for, with the table structure, but in the beginning, I get; <?xml version="1.0" encoding="UTF-16"?>.  I don't know where this is coming from, and it's making it so the displayarea.innerHTML line doesn't work.  displayarea is an area on my html page that I want the table to go.

I think I'm close, but can't get over this last part.  Can you provide some more insight?

Thanks,
- Mark

> 
> From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
> Date: 2006/03/10 Fri PM 12:48:08 EST
> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: Re: Re:  Multiple select listbox as parameter
> 
> ----- Original Message ----- 
> From: <mfreeman@xxxxxxxxxxxx>
> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Sent: Friday, March 10, 2006 5:43 PM
> Subject: Re: Re:  Multiple select listbox as parameter
> 
> 
> > Thanks for the reply Joe.  You have certainly maxed out my XSLT abilities.
> >
> > Anyway, I added your code to my HTML file and for all your functions that 
> > set a new ActiveXObject, I get the following error:
> >
> > 'Automation server can't create object'
> >
> > Originally I had all the ActiveXObjects set to 
> > MSXML2.FreeThreadedDOMDocument, so I tried that, but it crashed when I 
> > tried to set oParams.loadXML.
> >
> > It sounds like I have some other problems here than just passing the 
> > parameter, huh?
> >
> 
> Try changing the version from 4.0 to 3.0.
> Obviously you'll have to load the actual files from the server etc.
> 
> -- 
> 
> Joe 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.