Subject: Re: [xsl] Passing arrays into XSL From: Joern Nettingsmeier <nettings@xxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 26 Feb 2006 17:48:54 +0100 |
Hi Jern,
Thanks for your help.
But my need is bit different, we have to match with
the strings from the variable or the parameter from a
servlet response.
So i need to match those strings available in the
'param' with actual xml file. The xml file nodes may
be more than blue,red colors. So the XSL display
should be depends on the values available in the
param. The parameter string may be with a delimiter
','(red, blue) or '' (red blue). <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="arrayString">
for space-separated values, the term "list" is common in XML. for comma-separated values, i'd suggest CSVsomething.
blue,red </xsl:param>
<xsl:template match="colors">
<xsl:if test="contains(color,$arrayString)">
<xsl:text> do something</xsl:text> </xsl:if> </xsl:template>
</xsl:stylesheet>
-- jvrn nettingsmeier
home://germany/45128 essen/lortzingstr. 11/ http://spunk.dnsalias.org phone://+49/201/491621
if you are a free (as in "free speech") software developer and you happen to be travelling near my home, drop me a line and come round for a free (as in "free beer") beer. :-D
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] tokenize, looping, assign, Florent Georges | Thread | [xsl] [ANN] Saxon 8.7 is available , Michael Kay |
[xsl] parameter default for xsl:fun, Joern Nettingsmeier | Date | RE: [xsl] parameter default for xsl, Michael Kay |
Month |