[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Filtering nodes based on name and value
Hi List I would like to be able to filter a node by its value, but this node itself is unknown at the time of writing the xsl. <xml> <row> <N100>5</N100> <N101>2</N101> <N102>3</N102> </row> <row> <N100>4</N100> <N101>5</N101> <N102>6</N102> </row> <row> <N100>7</N100> <N101>8</N101> <N102>5</N102> </row> </xml> I would like to be able to select row nodes based on "name of the node is N101" (for example) and value is 5, but the name N101 is given as a parameter to a template. Thus it should be something like <xsl:value-of select="row[$param = 5]"/>, which doesn't work, though <xsl:value-of select="row[N101 = 5]"/> does. ($param being equal to 'N101'). And I would like to have <row> <N100>4</N100> <N101>5</N101> <N102>6</N102> </row> (not using value-of of course, only for the sake of the example ;) Any help would be much appreciated. Best regards, Fabien
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|