[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

putting selected="selected" in the right place

Subject: putting selected="selected" in the right place
From: Donal Regan <donal_regan10@xxxxxxxxxxx>
Date: Fri, 26 Mar 2004 02:07:08 +0000 (GMT)
selected selected
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.