|
Subject: Re: [xsl] XML subset selection-a simpler way? (message 27746) From: "Alan Varga" <aevarga@xxxxxx> Date: Wed, 28 Jun 2006 07:30:02 -0500 |
~~~~~ start of Javascript snippet ~~~~~ var sCalType = checkRadio(theForm.grpOptions); var sSelection = theForm.lstCalendar.value; var xslStylesheet = "test.xsl"; ... var xslDoc = Sarissa.getDomDocument(); xslDoc.async = false; xslDoc.load(xslStylesheet);
var processor = new XSLTProcessor();
processor.importStylesheet(xslDoc);
processor.setParameter(null, "type", sCalType);
processor.setParameter(null, "selection", sSelection);
...
function checkRadio(group){
for (x=0; x<group.length; x++) {
if (group[x].checked == true) {
val = group[x].value;
// alert(val);
}
}
return val;
}
~~~~~ end of Javascript snippet ~~~~~
~~~~~ start of XSL snippet ~~~~~ <xsl:param name="type"/> <xsl:param name="selection"/> ... <xsl:template match="Events"> <tbody> <xsl:choose> <xsl:when test="$type='Month'"> <xsl:apply-templates select="Event[MonthName=$selection]" /> </xsl:when> <xsl:when test="$type='Band'"> <xsl:apply-templates select="Event[Band=$selection]" /> </xsl:when> </xsl:choose> </tbody> </xsl:template> ... ~~~~~ end of XSL snippet ~~~~~
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] merging two xml files by a ge, Braumüller, Hans | Thread | [xsl] Xpath problem?, Seth Foss |
| [xsl] merging two xml files by a ge, Braumüller, Hans | Date | [xsl] Xpath problem?, Seth Foss |
| Month |