Search

Hello,
I need to exclude three nodes from a node list, but can't say where to start. Tried <xsl:apply-templates select="allregions/region[@link-name != 'aaa', 'bbb', 'ccc']" /> but it's not working.

This is [part of ] the node tree

<allregions>
    <region link-name="a1">A1</region>
    <region link-name="...">...</region>
    <region link-name="aaa">aaa</region>
    <region link-name="aaa">bbb</region>

Thanks!!

You need to split the 'not' query with and

<xsl:apply-templates select="allregions/region[@link-name != 'aaa' and @link-name != 'bbb' and @link-name != 'ccc']" />

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details