Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Filtering the output from XML file in XSLT

Hi,

Below is the XSL syntax to filter output from XML file based on single value:-

<xsl:for-each select="catalog/cd[artist='Bob']">

so, above code displays the text of the CD elements whose artist is 'Bob'.

But, whats the correct syntax to displays CD elements whose artist='Bob' And 'Alice' And 'Tom'.

is it:-
1. <xsl:for-each select="catalog/cd[artist='Bob'] And [artist='Alice']">

Or
2. <xsl:for-each select="catalog/cd[artist='Bob'] && [artist='Alice']">
OR
3. <xsl:for-each select="catalog/cd[artist='Bob' && 'Alice']">

anything else. Please guide me

Thanks,
Srinivas
[806 byte] By [srinivasc_it] at [2007-11-11 11:58:16]