XSLT tiene una funcion para hacer eso
<INPUT NAME="codigo" VALUE= " <xsl:value-of select='codigo'> " > </INPUT>
te dejo el código
Código:
<xsl:variable name="image-dir">/images</xsl:variable>
<xsl:template match="photograph">
<img src="{$image-dir}/{href}" width="{size/@width}"/>
</xsl:template>
With this source
<photograph>
<href>headquarters.jpg</href>
<size width="300"/>
</photograph>
the result would be
<img src="/images/headquarters.jpg" width="300"/>
Más info
http://www.w3.org/TR/xslt
Saludos
PD: Para generarlos automáticamente tienes que usar un bucle...