title: convert an xs:float value to a hex-string representation of its binary value
body: <p>Using xsl 2.0, how would you convert an xs:float value to a hex-string representation of its binary value?  i have no problem doing this for an integer (divide by 16 recursively and concatenate chars 0-9A-F), but float/double is stumping me.</p>
  
  <pre><code>&lt;xsl:function name="my:float-to-hex" as="xs:string"&gt;
      &lt;xsl:param name="in" as="xs:float"/&gt;
      &lt;xsl:sequence select="magic-here($in)"/&gt;
  &lt;/xsl:function&gt;
  </code></pre>
  
  <p>A valid answer may be that "this is not possible" and that would be valuable to me if it were true. I am open to other suggestions, but please don't depart from XSL. I am fully aware that there are more than one ways to skin this cat.</p>
  
  <p>To clarify, the expected output would be the same as the output from this C code:</p>
  
  <pre><code>float f = 28.25f;
  char *ptr = &amp;f;
  for(int i = 0; i &lt; sizeof(float); i++) { printf("%02X", *(ptr + i)); }
  </code></pre>
  
  <h3>third party edit</h3>
  
  <ul>
  <li>see <a href="https://www.w3.org/TR/xsl/" rel="nofollow noreferrer">XLS</a> </li>
  <li>or <a href="https://www.w3.org/TR/xslt20/" rel="nofollow noreferrer">XLST 2.0</a></li>
  </ul>