<!-- 
     This xml can be jsp:directive.include-d inside a node-container.
     It need two variables to exist:
     search:    string to search on
     nodetype:  fields of which node-type must be considered
     $Id: search.constraints.jspx,v 1.2 2005/06/28 12:33:20 michiel Exp $
-->
<jsp:root
    xmlns:jsp="http://java.sun.com/JSP/Page" 
    version="1.2"
    xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
    >
  <mm:isnotempty  xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0" referid="search">
    <mm:log>bla</mm:log>
    <mm:composite operator="OR">
      <mm:fieldlist type="search" nodetype="$nodetype">
        <mm:fieldinfo type="typedescription">
          <mm:compare valueset="STRING,XML">
            <mm:fieldinfo type="name">
              <mm:constraint field="$_" operator="LIKE" value="%$search%" />
            </mm:fieldinfo>
          </mm:compare>
        </mm:fieldinfo>
      </mm:fieldlist>
    </mm:composite>
  </mm:isnotempty>
  <!-- see remark in library.jspx -->
  <mm:hasfield nodetype="${nodetype}" name="version">
    <mm:constraint field="version" value="10000" />
  </mm:hasfield>
</jsp:root>