title: Error message 'adc' is an undeclared namespace
body: <p>All, am im relatively new to XSLT but did some solutions allready. Currently i am trying to write an xslt that moves a file to different folders based on if </p>
  
  <pre><code>&lt;adc:Status&gt;uploaded&lt;/adc:Status&gt; 
  </code></pre>
  
  <p>is "uploaded" or not. </p>
  
  <p>Despite declasring the xmlns:adc Namespace i get the error</p>
  
  <blockquote>
    <p>Exception Occured during TransForm using XSLT 2.0 (SaxonHe):
    System.Xml.XmlException: 'adc' is an undeclared namespace. Line 2,
    position 4.</p>
  </blockquote>
  
  <p>I spent hours looking for the error messages, trying to getmyself into namespaces, but currently i cant seem to find out whats the cause of the error.</p>
  
  <p>This is the xslt i wrote</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;xsl:stylesheet version="2.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:adc="http://www.ifra.com/adconnexion/#v2"
  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
  exclude-result-prefixes="xs xsi adc"&gt;
  &lt;xsl:output method="xml" encoding="ISO-8859-1" indent="yes"/&gt;
      &lt;xsl:template match="/"&gt;
          &lt;xsl:for-each select="/"&gt;
              &lt;xsl:variable name="Filename"&gt;
                  &lt;xsl:value-of select="replace(document-uri(.), '.*/', '')"/&gt;
              &lt;/xsl:variable&gt;
              &lt;xsl:choose&gt;
                  &lt;xsl:when test="/adc:adConnexion/adc:Requests/adc:AdOrder/adc:ProductionDetail/adc:Material/adc:Status='uploaded'"&gt;
                      &lt;!-- Business case --&gt;
                      &lt;xsl:variable name="OutputFileName" select="concat('file:///C:\UPLOADED\',$Filename)"/&gt;
                      &lt;xsl:result-document href="{$OutputFileName}"&gt;
                          &lt;xsl:copy-of select="current()"/&gt;
                      &lt;/xsl:result-document&gt;
                  &lt;/xsl:when&gt;
                  &lt;xsl:otherwise&gt;
                      &lt;!-- Non Business case --&gt;
                      &lt;xsl:variable name="OutputFileName" select="concat('file:///C:\ELSE\',$Filename)"/&gt;
                      &lt;xsl:result-document href="{$OutputFileName}"&gt;
                          &lt;xsl:copy-of select="current()"/&gt;
                      &lt;/xsl:result-document&gt;
                  &lt;/xsl:otherwise&gt;
              &lt;/xsl:choose&gt;
          &lt;/xsl:for-each&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>The simplified inputfile is</p>
  
  <pre><code>&lt;adc:adConnexion xmlns:adc="http://www.ifra.com/adconnexion/#v2"&gt;
    &lt;adc:Requests&gt;
      &lt;adc:AdOrder messageClass="BusinessTransaction" messageID="FEA*" bookingID="1234" messageCode="AD-O"&gt;
        &lt;adc:ProductionDetail&gt;
          &lt;adc:Material&gt;
              &lt;adc:Status&gt;uploaded&lt;/adc:Status&gt;
          &lt;/adc:Material&gt;
      &lt;/adc:AdOrder&gt;
    &lt;/adc:Requests&gt;
  &lt;/adc:adConnexion&gt;
  </code></pre>
  
  <p>Any help is greatly appreciated!</p>