I have a HTML select dropdown:

                &lt;select name="sortby"&gt;
                    &lt;option value=""&gt;&lt;/option&gt;
                    &lt;option value="onenightavg"&gt;Price: High to Low&lt;/option&gt;
                    &lt;option value="number_bedrooms"&gt;Bedrooms: High to Low&lt;/option&gt;
                    &lt;option value="number_bathrooms"&gt;Bathrooms: High to Low&lt;/option&gt;
                    &lt;option value="max_sleeps"&gt;Sleeps: High to Low&lt;/option&gt;
                &lt;/select&gt;


When the user submits this it sends a URL query string to the page and it gets added to the XML of the page:

&lt;querystring&gt;
 &lt;sortby&gt;number_bathrooms&lt;/sortby&gt;
&lt;/querystring&gt;


I then set an XSL variable in my XSLT: 

        &lt;xsl:variable name="sortby"&gt;
            &lt;xsl:choose&gt;
                &lt;xsl:when test="/querystring/sortby != ''"&gt;
                    &lt;xsl:value-of select="/querystring/sortby" /&gt;
                &lt;/xsl:when&gt;
                &lt;xsl:otherwise&gt;
                    &lt;xsl:value-of select="'onenightavg'" /&gt;
                &lt;/xsl:otherwise&gt;
            &lt;/xsl:choose&gt;
        &lt;/xsl:variable&gt;


In the above XST I am setting a variable called $sortby and testing whether the querystring exists.  If it does exist then set the variable to its value.  If it doesn't exist then default it to "onenightavg".

Then I use that variable in my sort:

&lt;xsl:sort data-type="number" order="ascending" select="$sortby" /&gt;


This doesn't work.  It doesn't sort my items, but when I hardcode the select to any one of the values like this it works:

&lt;xsl:sort data-type="number" order="ascending" select="onenightavg" /&gt;


I would like to be able to dynamically sort based on an the value of the selected option in the dropdown.


Question: Search predictions broken in Chrome - reinstall didn't solve the problem
Answer: Goto:

Stop sync and remove all of your
    synced data.

After relaunching Chrome, the problem should be solved.