Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Filtering with xsl on more parameters Filtering with xsl on more parametersTo: NULL Date: 11/21/2008 7:23:00 AM Hy dudes, I have a small problem and I doesn't see directly a solution to it. If you have an XML-file like this: <?xml version="1.0" encoding="ISO-8859-1" ?> <mainNode> <subnode id="id1"> <someInfo>information_1</someInfo> </subnode> <subnode id="id2"> <someInfo>information_2</someInfo> </subnode> <subnode id="id3"> <someInfo>information_3</someInfo> </subnode> <subnode id="id4"> <someInfo>information_4</someInfo> </subnode> <subnode id="id5"> <someInfo>information_5</someInfo> </subnode> </mainNode> I want to filter dynamically the information out of subnode with id: id1 and id3. An other time I will filter the information of subnode with id: id2, id5 and id3. Is there a way to filter it with xsl, without adapting your xsl filter. At the moment I filter like this: <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ Transform"> <xsl:param name="filter">id1</xsl:param> <mainNode> <xsl:for-each select="mainNode/subnode[$filter]"> <someInfo><xsl: value-of select="someInfo"/></somInfo> </xsl:for-each> </mainNode> The disadvantage in this way of working is that I can only fill in 1 variable, it has to be more... The solution of this problem has to be dynamically. The use like this <xsl:for-each select="mainNode/subnode [$filter or $fitlter2 or $filter3]"> isn't good. Is there enyone who can help me to solve my (little) problem? Greetz Peter De Witte a Belgian student | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
