title: XSL - Test a boolean value
body: <p>I've got a problem with a XSLT code in SharePoint 2010. 
  I'm not very expierienced with XSLT, but I think, I am able to read the code.
  From the SharePoint query I got this XML code:</p>
  
  <pre><code>&lt;Result&gt;
      &lt;id&gt;2&lt;/id&gt;
      &lt;workid&gt;160&lt;/workid&gt;
      &lt;rank&gt;67119018&lt;/rank&gt;
      &lt;title&gt;Angebot.pdf&lt;/title&gt;
      &lt;author_multival&gt;User, Name&lt;/author_multival&gt;
      &lt;author&gt;User, Name&lt;/author&gt;
      &lt;size&gt;440631&lt;/size&gt;
      &lt;url&gt;http://portal.url.de/sites/IT/Projects/Angebot.pdf&lt;/url&gt;
      &lt;urlEncoded&gt;http%3A%2F%2Fportal%2Eurl%2Ede%2Fsites%2FIT%2FProjects%2FAngebot%2Epdf&lt;/urlEncoded&gt;
      &lt;description&gt;&lt;/description&gt;
      &lt;write&gt;21.03.2014&lt;/write&gt;
      &lt;sitename&gt;http://portal.url.de/sites/IT/Projects&lt;/sitename&gt;
      &lt;collapsingstatus&gt;0&lt;/collapsingstatus&gt;
      &lt;hithighlightedsummary&gt;User, Name &lt;ddd /&gt; &lt;c0&gt;SharePoint&lt;/c0&gt;:Z-Drive &lt;ddd /&gt; Costs&lt;/hithighlightedsummary&gt;
      &lt;hithighlightedproperties&gt;
              &lt;HHTitle&gt;Angebot.pdf&lt;/HHTitle&gt;
              &lt;HHUrl&gt;http://portal.url.de/sites/IT/Projects/Angebot.pdf&lt;/HHUrl&gt;
      &lt;/hithighlightedproperties&gt;
      &lt;contentclass&gt;STS_ListItem_DocumentLibrary&lt;/contentclass&gt;
      &lt;isdocument&gt;True&lt;/isdocument&gt;
      &lt;picturethumbnailurl&gt;&lt;/picturethumbnailurl&gt;
      &lt;serverredirectedurl&gt;&lt;/serverredirectedurl&gt;
      &lt;sharepoint-invalid&gt;False&lt;/sharepoint-invalid&gt;
      &lt;fileextension_multival&gt;PDF&lt;/fileextension_multival&gt;
      &lt;fileextension&gt;PDF&lt;/fileextension&gt;
      &lt;ows_metadatafacetinfo&gt;Projectx0020Name|Project Name|o3PIYhfa0kOegAKxi60qtQ==|S7ZoMTb2ikCAhuSFlC+sGA==|#43318cf9-39f5-461c-a4d0-bd2653612092|SharePoint:Z-Drive;#Projectx0020Documentx0020Category0|Project Document Category|o3PIYhfa0kOegAKxi60qtQ==|zRewJpp710mnJ0bWknAb2Q==|#d8f09524-a0dc-4324-97c3-1d566e4af75f|Costs;#&lt;/ows_metadatafacetinfo&gt;
      &lt;popularsocialtags /&gt;
      &lt;imageurl imageurldescription=""&gt;/_layouts/images/pdf16.gif&lt;/imageurl&gt;
  </code></pre>
  
  <p></p>
  
  <p>Now I need to check the value of</p>
  
  <pre><code>&lt;sharepoint-invalid&gt;False&lt;/sharepoint-invalid&gt;
  </code></pre>
  
  <p>in XSLT.
  I tried the following code, but it won't work. I don't know how to check the boolean values correctly, because in the search is always <strong>"Valid"</strong> displayed.</p>
  
  <p>Here is my XSLT code:</p>
  
  <pre><code>&lt;xsl:choose&gt;
      &lt;xsl:when test="$SharePoint-Invalid = 'True'"&gt;
              &lt;span style="color:#EF1317;font-weight:bold;"&gt;Invalid&lt;/span&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:otherwise&gt;
              &lt;span style="color:#199039;font-weight:bold;"&gt;Valid&lt;/span&gt;
      &lt;/xsl:otherwise&gt; &lt;/xsl:choose&gt;
  </code></pre>
  
  <p>Can anyone help?
  Thanks in advance.</p>