title: Xquery processing error (saxon) XPST0003: Left operand of '>' needs parentheses
body: <p>I want to generate an HTML file from XML data using XQuery (with the Saxon XQuery processor).</p>
  
  <p>I am trying to create a list of "intervenants" (teachers), which contains the list of "unites" (classes) each one teaches.</p>
  
  <p>Here is my XQuery code:</p>
  
  <pre><code>declare boundary-space preserve;
  declare option saxon:output "method=xml";
  declare option saxon:output "encoding=iso-8859-1";
  declare option saxon:output "doctype-public=-//W3C//DTD XHTML 1.0 Strict//EN";
  declare option saxon:output "doctype-system=-http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";
  
  
  declare function local:main() {
      let $doc := doc("tp4.xml")/master
  
      for $intervenant in $doc/intervenants/intervenant
      order by $intervenant/nom
      return local:displayIntervenant($intervenant)
  };
  
  declare function local:displayIntervenant($intervenant) {
  
      &lt;li&gt;{data($intervenant/nom)} {data($intervenant/prénom)}&lt;/li&gt;
      &lt;li&gt;Unites: &lt;/li&gt;
          &lt;ul&gt;:here will be the function for getting "unites":&lt;/ul&gt;
  
  };
  
  &lt;html&gt;
  &lt;body&gt;
  &lt;h1&gt;Intervenants&lt;/h1&gt;
      &lt;ul&gt;
          {local:main()}
      &lt;/ul&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have the following error:</p>
  
  <pre><code>$java -cp Saxon/saxon9he.jar net.sf.saxon.Query !indent=yes xq.txt &gt; www/xq.html
  Syntax error on line 19 at column 6 of file:/home/luc/Documents/XML/TP4/xq.txt near {...ant/prénom)}&lt;/li&gt; &lt;li&gt;Unite...} 
    XPST0003: Left operand of '&gt;' needs parentheses
  </code></pre>
  
  <p>The line 19 refers to the second <code>&lt;li&gt;</code> element.</p>
  
  <p>I don't understand the error message and I can't fix it.</p>