[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] putting selected="selected" in the right place
Hello, Thank you for all the help on previous questions, it really is appreciated. Now,I want to display a select box with a default date determined by some XML input such as <Booking> <checkIn>31-03-2004</checkIn> <Booking> How do I put a ' selected="selected" ' statement in the appropriate option tag without having an "if" statement around each option? Is this the right way to go about it?Should I be thinking of using recursive templates? <xsl:template match="checkIn"> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td nowrap="nowrap"> <select name="year" class="box60"> <option>2004</option> <option>2005</option> </select> </td> <td nowrap="nowrap"> <select name="month" class="box40"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option> <option>11</option> <option>12</option> </select> </td> <td nowrap="nowrap"><select name="day" class="box40"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option> <option>11</option> <option>12</option> <option>13</option> <option>14</option> <option>15</option> <option>16</option> <option>17</option> <option>18</option> <option>19</option> <option>20</option> <option>21</option> <option>22</option> <option>23</option> <option>24</option> <option>25</option> <option>26</option> <option>27</option> <option>28</option> <option>29</option> <option>30</option> <option>31</option> </select> </td> </tr> </table> </xsl:template> ___________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|