<mm:content type="application/xml"
            expires="-1"
            postprocessor="none"
            xmlns="http://www.w3.org/1999/xhtml"
            xmlns:jsp="http://java.sun.com/JSP/Page"
            xmlns:fn="http://java.sun.com/jsp/jstl/functions"
            xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0">
  <jsp:directive.page session="false" errorPage="error.jspx" />
  <jsp:output omit-xml-declaration="true" />
  <mm:import id="kupu_node" from="session" externid="node" />
  <mm:import id="node" externid="kupu_node" from="parameters,this,session" />
  <mm:cloud method="asis">
    <mm:notpresent referid="node">
      <mm:remove referid="node" />
      <mm:node number="${param.objectnumber}" id="node" notfound="skip">

      </mm:node>
    </mm:notpresent>

    <mm:present referid="node">
      <mm:node  number="$node">
        <mm:formatter xslt="xslt/mmxf2kupu.xslt" id="sent" escape="none">
          <mm:param name="client" value="${fn:contains(header['user-agent'], 'MSIE')  ? 'msie' : 'gecko'}" />
          <mm:field name="body" />
          <mm:listrelations type="object" role="idrel" searchdir="destination" >
            <mm:relatednode>
              <mm:nodeinfo type="nodemanager">
                <mm:compare value="blocks">
                  <mm:listrelations type="object" role="idrel" searchdir="destination" >
                    <mm:relatednode />
                  </mm:listrelations>
                </mm:compare>
              </mm:nodeinfo>
            </mm:relatednode>
          </mm:listrelations>
        </mm:formatter>
        <!--
        <mm:log>Sending <mm:write referid="sent" escape="none" /></mm:log>
        -->
      </mm:node>
    </mm:present>

    <mm:notpresent referid="node">
      <p>NODE NOT FOUND</p>
    </mm:notpresent>

  </mm:cloud>
</mm:content>
