In a XIB website description, an input binding provides necessary information for the dynamic construction of a WebL script to extract information from the source. Suppose that we are performing a query on the following form from AmazonSearch:
From the form, we see that the method is "post" and the input variables are "keyword-query" and "mode". From the INPUT, we saw that the variables that take the values of user input were called "AmazonQuery" and "AmazonMode". Hence, when we submit the query, "amazonQuery' will map to "keyword-query" and "amazonMode" will map to "mode". We can define the INPUT BINDING as follows:
<INPUTBINDING>
<BASE method="POST" page="Elem(P,
"form")[0]">
"http://www.amazon.com" </BASE>
<BINDING variable="amazonQuery"
mapsTo="keyword-query" />
<BINDING variable="amazonMode"
mapsTo="mode"/>
</INPUTBINDING>
The variable "page" takes a description of the location of the form on the webpage in WebL syntax. The value "Elem(P, "form")[0]" means that the form is in the list of "form" elements on the page and it is the 0th element on the list.