title: XSLT is not comparing multiple values in "when" condition?
body: <p>Below is the part of the XSL where I am trying to check the file extension against multiple possible values  and the content type against  in the XML file where I already have preset value, but for some reason it is not checking the first condition. I have also put the xml file below        </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dp="http://www.datapower.com/extensions" xmlns:swa="http://ws.apache.org/axis2/mtomsample/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inc="http://www.w3.org/2004/08/xop/include" xmlns:dpconfig="http://www.datapower.com/param/config" extension-element-prefixes="dp" exclude-result-prefixes="dp dpconfig inc"&gt;
  &lt;xsl:template match="/"&gt;
      &lt;xsl:variable name="manifest" select="dp:variable('var://context/INPUT/attachment-manifest')"/&gt;
      &lt;xsl:variable name="ContType" select="$manifest/manifest/attachments/attachment/header[1]/./value/text()"/&gt;
      &lt;xsl:variable name="ContentType" select="substring-before($ContType,';')"/&gt;
      &lt;xsl:variable name="filename" select="$manifest/manifest/attachments/attachment/header[4]/./value/text()"/&gt;
      &lt;xsl:variable name="fileExtension" select="substring-before(substring-after($filename,'.'),'&amp;quot;')"/&gt;
      &lt;xsl:variable name="File_CD" select="document('local:///FileIntake/Resources/FileServiceConfigData.xml')"/&gt;
      &lt;xsl:variable name="DocCategories" select="document('local:///FileIntake/Resources/DocTypes.xml')"/&gt;
      &lt;xsl:variable name="IncomingFileSize" select="number(dp:variable('var://service/mpgw/request-size'))"/&gt;
      &lt;xsl:variable name="SetFileSize" select="number($File_CD/FileServiceConfig/FileSize)"/&gt;
      &lt;dp:set-variable name="'var://context/var/IncomingFileSize'" value="$IncomingFileSize"/&gt;
      &lt;dp:set-variable name="'var://context/var/SetFileSize'" value="$SetFileSize"/&gt;
      &lt;dp:set-variable name="'var://context/var/ContentType'" value="$ContentType"/&gt;
      &lt;dp:set-variable name="'var://context/var/fileExtension'" value="$fileExtension"/&gt;
      &lt;xsl:choose&gt;
          &lt;xsl:when test="$fileExtension != $DocCategories/DocTypeMapping/DocumentType/ContentValue/*"&gt;
              &lt;dp:reject&gt;Wrong FileType&lt;/dp:reject&gt;
          &lt;/xsl:when&gt;
          &lt;xsl:when test="$ContentType != $DocCategories/DocTypeMapping/DocumentType/ContentType"&gt;
              &lt;dp:reject&gt;Unsupported ContenType&lt;/dp:reject&gt;
          &lt;/xsl:when&gt;
          &lt;xsl:when test="$IncomingFileSize &amp;gt; $SetFileSize"&gt;
              &lt;dp:reject&gt;File size exceeded enforced limit&lt;/dp:reject&gt;
          &lt;/xsl:when&gt;
          &lt;xsl:otherwise&gt;
              &lt;dp:accept/&gt;
          &lt;/xsl:otherwise&gt;
      &lt;/xsl:choose&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>DocTypes File:</p>
  
  <pre><code>&lt;DocTypeMapping&gt;
  &lt;DocumentType&gt;
      &lt;ContentType&gt;application/octet-stream&lt;/ContentType&gt;
      &lt;ContentValue&gt;xls&lt;/ContentValue&gt;
      &lt;ContentValue&gt;xlsx&lt;/ContentValue&gt;
      &lt;ContentValue&gt;dat&lt;/ContentValue&gt;
  &lt;/DocumentType&gt;
  &lt;/DocTypeMapping&gt;
  </code></pre>
  
  <p>Can someone see if there is something wrong with the logic?</p>