|
Subject: [xsl] using parameters in filters? From: "Mattias Konradsson" <preacher@xxxxxxxxxxx> Date: Fri, 23 Feb 2001 17:58:49 +0100 |
I'm doing a solution where you can filter a clientside view of xml data on
the fly.. using MSXML3. The problem I'm having is that it doesnt seem to
work to pass the filter criteria as a parameter, maybe someone can tell me
what i'm doing wrong
Javascript:
function init()
{
var xslProc;
var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
var xslt = new ActiveXObject("Msxml2.XSLTemplate");
xslDoc.async = false;
xslDoc.load(stylesheet);
xslt.stylesheet = xslDoc;
xmlDoc.async = false;
xmlDoc.loadXML(inbox.xml);
xslProc = xslt.createProcessor();
xslProc.addParameter("filter", "@repliedto = 'False'");
xslProc.addParameter("sortby", "@messageid");
xslProc.input = xmlDoc;
xslProc.transform();
messages.innerHTML = xslProc.output
}
stylesheet:
<xsl:apply-templates select="message[$filter]" />
I know for a fact that the parameter gets passed correctly and that the
result giving the correct parameter should work.. but it simply shows all
the elements
when I use the param. If I instead try to set the param to
message[@repliedto = 'False'] and use <xsl:apply-templates
select="$filter" /> I get an error message saying something akin to
"variable or parameter must evaluate to a nodelist".
Best Regard
---
Mattias Konradsson
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Question regarding msxml3, Jonathan Marsh | Thread | Re: [xsl] using parameters in filte, David Carlisle |
| RE: [xsl] Question regarding msxml3, Michael Kay | Date | Re: [xsl] Bib refs, David Carlisle |
| Month |