title: XTDE0160 : XSLT 1.0 compatibility mode is not available in this configuration in buil-in template rule for /invoice:request in the unnamed mode
body: <p>I'm always with the same problem. I've allready created a question : Namespace prefix xsl on value-of is not defined. thanks to Michael for his answers. I saw all similar questions, but I found nothing to help me. I test my code with saxon9he and I try to group it with muenchian method.
  XML file :</p>
  
  <pre><code>&lt;invoice:request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:invoice="http://www.xmlData.ch/xmlInvoice/XSD" 
      xsi:schemaLocation="http://www.forum-datenaustausch.ch/invoice MDInvoiceRequest_400.xsd" role="production"&gt;
  
      &lt;invoice:invoice invoice_id="22"&gt;
        &lt;invoice:vat&gt;0.00&lt;/invoice:vat&gt;
        &lt;invoice:record_tarmed&gt;Rapport médical sur formulaire assurance-maladie&lt;/invoice:record_tarmed&gt;
    &lt;/invoice:invoice&gt;
      &lt;invoice:invoice invoice_id="23"&gt;
        &lt;invoice:vat&gt;5.00&lt;/invoice:vat&gt;
        &lt;invoice:record_tarmed&gt;Salle d'examen et de traitement, chirurgie et chirurgie pédiatrique&lt;/invoice:record_tarmed&gt;
     &lt;/invoice:invoice&gt; 
  &lt;/invoice:request&gt;
  </code></pre>
  
  <p>XSLT file :</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:invoice="http://www.xmlData.ch/xmlInvoice/XSD"
    exclude-result-prefixes="invoice"&gt;
  
    &lt;xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/&gt;
  
    &lt;xsl:key name="factures-par-TVA" match="invoice:invoice" use="invoice:vat"/&gt;
    &lt;xsl:template match="invoice:request"&gt;
      &lt;Documents&gt;
         &lt;xsl:for-each select="invoice:invoice[count(. | key('factures-par-TVA', invoice:vat)[1]) = 1]"&gt;
            &lt;xsl:sort select="invoice:vat" /&gt;
            &lt;Document&gt;
              &lt;xsl:copy-of select="invoice:vat" /&gt;
              &lt;xsl:for-each select="key('factures-par-TVA',invoice:vat)"&gt;
                 &lt;xsl:sort select="invoice:invoice/@invoice_id"/&gt;
                 &lt;xsl:copy-of select="invoice:record_tarmed"/&gt;
              &lt;/xsl:for-each&gt;
            &lt;/Document&gt;
          &lt;/xsl:for-each&gt;
        &lt;/Documents&gt;
      &lt;/xsl:template&gt;
    &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>The result is the same : error XTDE0160. If I remove 'invoice:' for 'request', the temp.html file contains the text of the 4 nodes and I get this warning SXXP0005 : the source document is in namespace <a href="http://www.xmlData.ch/xmlInvoice/XSD" rel="nofollow noreferrer">http://www.xmlData.ch/xmlInvoice/XSD</a>, but all the template rules match elements in no namespace.</p>
  
  <p>I tried the mode attribute of xsl:template but it does'nt work.</p>
  
  <p>what can I do ?</p>
  
  <p>thanks for your help</p>