Hi<BR><BR>I am trying to build a generic function to building forms using ASP3.0, XML and XSLT.<BR><BR>The idea/theory is to be able to create a form holding any number of differing elements simply by passing a single variable to the XML and XSLT which would tell it which node in the XML to get the form structure. There by allowing control/creation of numerous forms simply through adding nodes to the xml file. Also the only time I want to hit the database is to insert the form data or pull values for an "edit form" feature (see below). The XML and XSLT will be standard text files, not stored on the database.<BR><BR>I have managed to the the form built correctly. The form layout is determined by the XSLT file and the form elements and thier associated attributes are based upon the XML file contents.<BR><BR>The problem I have run into is if I want to render a form which has one/some/all of the elements prepopulated I cannot do this in a generic fashion as I have to know exactly the quantity of parameters to have in the XSLT and to which bit in the XSLT they belong to.<BR><BR>Is there any way of using arrays within XSLT? If so I could then pass an array to it using ASP that is filled with either values or NULL&#039;s whereby I can do something like<BR>&#060;INPUT NAME="@NAME" TYPE="TEXT" MAXLENGTH="@MAXLENGTH"&#062;<BR>**&#060;xsl:if test="$array[x] != &#039;NULL&#039;"&#062;<BR>****&#060;xsl:attri bute name="VALUE"&#062;<BR>******&#060;xsl:value-of select="$array[x]" /&#062;<BR>****&#060;/xsl:attribute&#062;<BR>****&#060;/xsl:if&#062;<BR>&#060;/INPUT&#062;<BR>Where x corresponds to the element in question.<BR><BR>Current example:<BR>http://www.safari-trader.com/functions/form_builder/index.asp<BR><BR>http://www.safari-trader.com/functions/form_builder/forms.xml<BR><BR>http://www.safari-trader.com/functions/form_builder/forms.xslt<BR><BR>Any help/pointers would be appreciated....<BR><BR>John