title: Can XSLT populate input fields using returned XML data?
body: <p>this may well be a very basic question, but I haven't been able to find anything on here or after an hour checking via google. I have a form with a load of inputs on it and a search autocomplete that will call xml data for the selected record. I intend to use an XSLT to transform this XML data and reproduce the completed version of the form for that client. I am new to XSLT's so I have been experimenting with smaller examples so far, however I cannot, even in this smaller set up, get the produced HTML to have it's inputs populated by the data in the XML. </p>
  
  <p>Xalan will produce the HTML so I think both the XML and XSLT are at least vaild. The example code for both is shown below. I am aware that there is redundant code, (on key ups etc) in the XSLT. It is just a remenant from the full form that I will hopefully be getting working once I can sort tis example out.</p>
  
  <p>XML</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!-- clienttest.xml --&gt;
  &lt;?xml-stylesheet type="text/xsl" href="XSLTtest.xsl"?&gt;
  &lt;clientdetails&gt;
      &lt;clientcode&gt;
          &lt;CL.CREF&gt;testsubjectcode&lt;/CL.CREF&gt;
      &lt;/clientcode&gt;
      &lt;clientname&gt;
          &lt;CL.NAME&gt;testsubjectname&lt;/CL.NAME&gt;
      &lt;/clientname&gt;
      &lt;clientaccount&gt;
          &lt;CL.ACCT&gt;testsubjectaccount&lt;/CL.ACCT&gt;
      &lt;/clientaccount&gt;
  &lt;/clientdetails&gt;
  </code></pre>
  
  <p>XSLT</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!-- greeting.xsl --&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  
      &lt;xsl:output method="html" indent="yes" omit-xml-declaration="no"
              encoding="UTF-8"
              doctype-public="-//W3C//DTD XHTML 1.1//EN"
              doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/&gt;
  
      &lt;xsl:template match="/"&gt;
          &lt;html&gt;
              &lt;head&gt;
                  &lt;title&gt;XSLT Trials&lt;/title&gt;
              &lt;/head&gt;
              &lt;body&gt;
                      &lt;xsl:apply-templates select="clientdetails"/&gt;
              &lt;/body&gt;
          &lt;/html&gt; 
      &lt;/xsl:template&gt;             
  
      &lt;xsl:template match="clientdetails"&gt;
          &lt;form&gt;
              &lt;label for="clientcode"&gt;Client code:&lt;/label&gt;     
              &lt;input class="medium" name="clientcode" method="post" onkeyup="changed2()" type="text" id="clientcode" placeholder="New client's code"&gt;
                  &lt;xsl:value-of select="./clientcode/CL.CREF"/&gt;
              &lt;/input&gt;
              &lt;br&gt;&lt;/br&gt;
              &lt;label for="clientname"&gt;Client name:&lt;/label&gt;
              &lt;input class="medium" name="clientname" method="post" onkeyup="changed()" type="text" id="clientname" placeholder="New client's name"&gt; 
                  &lt;xsl:value-of select="./clientname/CL.NAME"/&gt;
              &lt;/input&gt;
              &lt;br&gt;&lt;/br&gt;
              &lt;label for="secondaccountcode"&gt;Second account code:&lt;/label&gt;
              &lt;input class="medium" id="secondaccountcode" name="secondaccountcode" type="text"&gt; 
                  &lt;xsl:value-of select="./clientaccount/CL.ACCT"/&gt;
              &lt;/input&gt;
          &lt;/form&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>If anyone can give me a hand that would be great. I think I'm quite close but I just can't get it to behave atm. Thanks</p>