How can I add multiple filters to a XSLT for-each statement?

Posted by Huuuze on Stack Overflow See other posts from Stack Overflow or by Huuuze
Published on 2011-01-13T23:33:04Z Indexed on 2011/01/14 13:53 UTC
Read the original article Hit count: 254

Filed under:
|
|
|

I have the following XSLT node:

<xsl:for-each select="Book[title != 'Moby Dick']">
....
</xsl:for-each>

However, I'd like use multiple filters in the for-each. I've tried the following, but it doesn't seem to work:

<!-- Attempt #1 -->
<xsl:for-each select="Book[title != 'Moby Dick'] or Book[author != 'Rowling'] ">
....
</xsl:for-each>


<!-- Attempt #2 -->
<xsl:for-each select="Book[title != 'Moby Dick' or author != 'Rowling']">
....
</xsl:for-each>

© Stack Overflow or respective owner

Related posts about xslt

Related posts about xpath