title: How to check if multiple variables have same value in XSL?
body: <p>I have an XSL where i am getting the values of 6 variables. The 6 variables have an integer value say 3,4 etc. I need to check if all the 6 variables have the same value or not. How can i achieve this in an XSL ? 
  My XML is : </p>
  
  <pre><code>&lt;records&gt;
      &lt;A&gt;
         &lt;Value&gt; test &lt;/Value&gt;
         &lt;Value&gt; test &lt;/Value&gt;
         &lt;Value&gt; test &lt;/Value&gt;
      &lt;/A&gt;
      &lt;B&gt;
         &lt;Value&gt; test &lt;/Value&gt;
      &lt;/B&gt;
      &lt;C&gt;
         &lt;Value&gt; test &lt;/Value&gt;
         &lt;Value&gt; test &lt;/Value&gt;
      &lt;/C&gt;
      &lt;D&gt;
          &lt;Value&gt; test &lt;/Value&gt;
      &lt;/D&gt;
      &lt;E&gt;
          &lt;Value&gt; test &lt;/Value&gt;
          &lt;Value&gt; test &lt;/Value&gt;
      &lt;/E&gt;
      &lt;F&gt;
          &lt;Value&gt; test &lt;/Value&gt;                        
      &lt;/F&gt;
  &lt;/records&gt;
  </code></pre>
  
  <p>My XSL Looks like : </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"&gt;
  
      &lt;xsl:output method="xml" doctype-public="XSLT-compat" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" /&gt;
  
      &lt;xsl:variable
      name="noOfANodes"
      select="count(/records/A/*)"&gt;
      &lt;/xsl:variable&gt;
  
      &lt;xsl:variable
      name="noOfBNodes"
      select="count(/records/B/*)"&gt;
      &lt;/xsl:variable&gt;
  
      &lt;xsl:variable
      name="noOfCNodes"
      select="count(/records/C/*)"&gt;
      &lt;/xsl:variable&gt;
  
      &lt;xsl:variable
      name="noOfDNodes"
      select="count(/records/D/*)"&gt;
      &lt;/xsl:variable&gt;
  
      &lt;xsl:variable
      name="noOfENodes"
      select="count(/records/E/*)"&gt;
      &lt;/xsl:variable&gt;
  
      &lt;xsl:variable
      name="noOfFNodes"
      select="count(/records/F/*)"&gt;
      &lt;/xsl:variable&gt;
  
      &lt;xsl:template match="/"&gt;
           &lt;xsl:choose&gt;
              &lt;!-- The following is obv wrong. --&gt;
              &lt;xsl:when test="$noOfANodes=$noOfBNodes=$noOfCNodes=$noOfDNodes"&gt; 
           &lt;/xsl:when&gt;
  
      &lt;xsl:otherwise&gt;
  
      &lt;/xsl:otherwise&gt;
  
      &lt;/xsl:choose&gt;
      &lt;/xsl:template&gt;
  </code></pre>