Kulanthaivel Palanichamy | 8ccd672 | 2014-02-19 15:48:02 -0800 | [diff] [blame] | 1 | <!-- |
| 2 | # Copyright (c) 2014, The Linux Foundation. All rights reserved. |
| 3 | # |
| 4 | # Redistribution and use in source and binary forms, with or without |
| 5 | # modification, are permitted provided that the following conditions are |
| 6 | # met: |
| 7 | # * Redistributions of source code must retain the above copyright |
| 8 | # notice, this list of conditions and the following disclaimer. |
| 9 | # * Redistributions in binary form must reproduce the above |
| 10 | # copyright notice, this list of conditions and the following |
| 11 | # disclaimer in the documentation and/or other materials provided |
| 12 | # with the distribution. |
| 13 | # * Neither the name of The Linux Foundation nor the names of its |
| 14 | # contributors may be used to endorse or promote products derived |
| 15 | # from this software without specific prior written permission. |
| 16 | # |
| 17 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 18 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 19 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 21 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 24 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 26 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 27 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | --> |
| 29 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
| 30 | |
| 31 | <xsl:output method="html" omit-xml-declaration="no" indent="yes"/> |
| 32 | |
| 33 | <xsl:variable name="wml_card">wml_card</xsl:variable> |
| 34 | <xsl:variable name="wml_select">wml_select</xsl:variable> |
| 35 | <xsl:variable name="wml_input">wml_input</xsl:variable> |
| 36 | <xsl:variable name="wml_timer">wml_timer</xsl:variable> |
| 37 | <xsl:variable name="wml_setvar">wml_setvar</xsl:variable> |
| 38 | <xsl:variable name="wml_postfield">wml_postfield</xsl:variable> |
| 39 | <xsl:variable name="wml_anchor_task">wml_anchor_task</xsl:variable> |
| 40 | <xsl:variable name="wml_anchor_go">wml_anchor_go</xsl:variable> |
| 41 | <xsl:variable name="wml_anchor_prev">wml_anchor_prev</xsl:variable> |
| 42 | <xsl:variable name="select_onchange_handler">handleSelectOnchangeEvent(this)</xsl:variable> |
| 43 | <xsl:variable name="wml_empty_str"></xsl:variable> |
| 44 | <xsl:variable name="wml_noop_href">javascript:void();</xsl:variable> |
| 45 | <xsl:variable name="wml_template">wml_template</xsl:variable> |
| 46 | <xsl:variable name="wml_onevent">wml_onevent</xsl:variable> |
| 47 | <xsl:variable name="wml_task_go">wml_task_go</xsl:variable> |
| 48 | <xsl:variable name="wml_task_refresh">wml_task_refresh</xsl:variable> |
| 49 | <xsl:variable name="wml_task_prev">wml_task_prev</xsl:variable> |
| 50 | <xsl:variable name="wml_task_noop">wml_task_noop</xsl:variable> |
| 51 | |
| 52 | |
| 53 | <xsl:template match="/"> |
| 54 | <xsl:apply-templates /> |
| 55 | </xsl:template> |
| 56 | |
| 57 | <xsl:template match="wml"> |
| 58 | <html> |
| 59 | <head> |
| 60 | <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"></meta> |
| 61 | <link rel="stylesheet" href="file:///android_asset/wml/swe_wml.css" type="text/css"></link> |
| 62 | <script src="file:///android_asset/wml/swe_wml.js" type="text/javascript"></script> |
| 63 | </head> |
| 64 | <body class="wml_body"> |
| 65 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 66 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 67 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 68 | <xsl:apply-templates /> |
| 69 | </body> |
| 70 | </html> |
| 71 | </xsl:template> |
| 72 | |
| 73 | <xsl:template match="card"> |
| 74 | <div> |
| 75 | <xsl:choose> |
| 76 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_card, ' ', @class)"/></xsl:attribute></xsl:when> |
| 77 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="$wml_card"/></xsl:attribute></xsl:otherwise> |
| 78 | </xsl:choose> |
| 79 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 80 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 81 | <xsl:choose><xsl:when test="@title"><xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute></xsl:when></xsl:choose> |
| 82 | <xsl:choose><xsl:when test="@onenterforward"><xsl:attribute name="data-wml_onenterforward"><xsl:value-of select="@onenterforward"/></xsl:attribute></xsl:when></xsl:choose> |
| 83 | <xsl:choose><xsl:when test="@onenterbackward"><xsl:attribute name="data-wml_onenterbackward"><xsl:value-of select="@onenterbackward"/></xsl:attribute></xsl:when></xsl:choose> |
| 84 | <xsl:choose><xsl:when test="@ontimer"><xsl:attribute name="data-wml_ontimer"><xsl:value-of select="@ontimer"/></xsl:attribute></xsl:when></xsl:choose> |
| 85 | <xsl:choose><xsl:when test="@newcontext"><xsl:attribute name="data-wml_newcontext"><xsl:value-of select="@newcontext"/></xsl:attribute></xsl:when></xsl:choose> |
| 86 | <xsl:choose><xsl:when test="@ordered"><xsl:attribute name="data-wml_ordered"><xsl:value-of select="@ordered"/></xsl:attribute></xsl:when></xsl:choose> |
| 87 | <div class="wml_card_title"><center><xsl:value-of select="@title" /></center></div> |
| 88 | <div class="wml_card_content"> |
| 89 | <xsl:apply-templates /> |
| 90 | <xsl:for-each select="/wml/template"> |
| 91 | <span> |
| 92 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 93 | <xsl:choose> |
| 94 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_template, ' ', @class)"/></xsl:attribute></xsl:when> |
| 95 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="$wml_template"/></xsl:attribute></xsl:otherwise> |
| 96 | </xsl:choose> |
| 97 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 98 | <xsl:choose><xsl:when test="@onenterforward"><xsl:attribute name="data-wml_onenterforward"><xsl:value-of select="@onenterforward"/></xsl:attribute></xsl:when></xsl:choose> |
| 99 | <xsl:choose><xsl:when test="@onenterbackward"><xsl:attribute name="data-wml_onenterbackward"><xsl:value-of select="@onenterbackward"/></xsl:attribute></xsl:when></xsl:choose> |
| 100 | <xsl:choose><xsl:when test="@ontimer"><xsl:attribute name="data-wml_ontimer"><xsl:value-of select="@ontimer"/></xsl:attribute></xsl:when></xsl:choose> |
| 101 | <xsl:apply-templates /> |
| 102 | </span> |
| 103 | </xsl:for-each> |
| 104 | </div> |
| 105 | </div> |
| 106 | </xsl:template> |
| 107 | |
| 108 | <xsl:template match="head|template|style|link|script" /> |
| 109 | |
| 110 | <xsl:template match="p"> |
| 111 | <p> |
| 112 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 113 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 114 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 115 | <xsl:choose><xsl:when test="@align"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute></xsl:when></xsl:choose> |
| 116 | <xsl:choose><xsl:when test="@mode"><xsl:attribute name="data-wml_mode"><xsl:value-of select="@mode"/></xsl:attribute></xsl:when></xsl:choose> |
| 117 | <xsl:apply-templates /> |
| 118 | </p> |
| 119 | </xsl:template> |
| 120 | |
| 121 | <xsl:template match="br"> |
| 122 | <br> |
| 123 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 124 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 125 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 126 | <xsl:apply-templates /> |
| 127 | </br> |
| 128 | </xsl:template> |
| 129 | |
| 130 | <xsl:template match="pre"> |
| 131 | <pre> |
| 132 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 133 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 134 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 135 | <xsl:apply-templates /> |
| 136 | </pre> |
| 137 | </xsl:template> |
| 138 | |
| 139 | <xsl:template match="b"> |
| 140 | <b> |
| 141 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 142 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 143 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 144 | <xsl:apply-templates /> |
| 145 | </b> |
| 146 | </xsl:template> |
| 147 | |
| 148 | <xsl:template match="big"> |
| 149 | <big> |
| 150 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 151 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 152 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 153 | <xsl:apply-templates /> |
| 154 | </big> |
| 155 | </xsl:template> |
| 156 | |
| 157 | <xsl:template match="em"> |
| 158 | <em> |
| 159 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 160 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 161 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 162 | <xsl:apply-templates /> |
| 163 | </em> |
| 164 | </xsl:template> |
| 165 | |
| 166 | <xsl:template match="i"> |
| 167 | <i> |
| 168 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 169 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 170 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 171 | <xsl:apply-templates /> |
| 172 | </i> |
| 173 | </xsl:template> |
| 174 | |
| 175 | <xsl:template match="small"> |
| 176 | <small> |
| 177 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 178 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 179 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 180 | <xsl:apply-templates /> |
| 181 | </small> |
| 182 | </xsl:template> |
| 183 | |
| 184 | <xsl:template match="strong"> |
| 185 | <strong> |
| 186 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 187 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 188 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 189 | <xsl:apply-templates /> |
| 190 | </strong> |
| 191 | </xsl:template> |
| 192 | |
| 193 | <xsl:template match="u"> |
| 194 | <u> |
| 195 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 196 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 197 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 198 | <xsl:apply-templates /> |
| 199 | </u> |
| 200 | </xsl:template> |
| 201 | |
| 202 | <xsl:template match="a"> |
| 203 | <a onclick="handleAOnClick(event, this)"> |
| 204 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 205 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 206 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 207 | <xsl:choose><xsl:when test="@title"><xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute></xsl:when></xsl:choose> |
| 208 | <xsl:choose><xsl:when test="@href"><xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute></xsl:when></xsl:choose> |
| 209 | <xsl:apply-templates /> |
| 210 | </a> |
| 211 | </xsl:template> |
| 212 | |
| 213 | <xsl:template match="img"> |
| 214 | <img> |
| 215 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 216 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 217 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 218 | <xsl:choose><xsl:when test="@alt"><xsl:attribute name="alt"><xsl:value-of select="@alt"/></xsl:attribute></xsl:when></xsl:choose> |
| 219 | <xsl:choose><xsl:when test="@src"><xsl:attribute name="src"><xsl:value-of select="@src"/></xsl:attribute></xsl:when></xsl:choose> |
| 220 | <xsl:choose><xsl:when test="@align"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute></xsl:when></xsl:choose> |
| 221 | <xsl:choose><xsl:when test="@height"><xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute></xsl:when></xsl:choose> |
| 222 | <xsl:choose><xsl:when test="@width"><xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute></xsl:when></xsl:choose> |
| 223 | <xsl:choose><xsl:when test="@localsrc"><xsl:attribute name="data-wml_localsrc"><xsl:value-of select="@localsrc"/></xsl:attribute></xsl:when></xsl:choose> |
| 224 | <xsl:choose><xsl:when test="@vspace"><xsl:attribute name="data-wml_vspace"><xsl:value-of select="@vspace"/></xsl:attribute></xsl:when></xsl:choose> |
| 225 | <xsl:choose><xsl:when test="@hspace"><xsl:attribute name="data-wml_hspace"><xsl:value-of select="@hspace"/></xsl:attribute></xsl:when></xsl:choose> |
| 226 | <xsl:apply-templates /> |
| 227 | </img> |
| 228 | </xsl:template> |
| 229 | |
| 230 | <xsl:template match="table"> |
| 231 | <table> |
| 232 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 233 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 234 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 235 | <xsl:choose><xsl:when test="@title"><xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute></xsl:when></xsl:choose> |
| 236 | <xsl:choose><xsl:when test="@align"><xsl:attribute name="data-wml_align"><xsl:value-of select="@align"/></xsl:attribute></xsl:when></xsl:choose> |
| 237 | <xsl:choose><xsl:when test="@columns"><xsl:attribute name="data-wml_columns"><xsl:value-of select="@columns"/></xsl:attribute></xsl:when></xsl:choose> |
| 238 | <xsl:apply-templates /> |
| 239 | </table> |
| 240 | </xsl:template> |
| 241 | |
| 242 | <xsl:template match="tr"> |
| 243 | <tr> |
| 244 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 245 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 246 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 247 | <xsl:choose><xsl:when test="@align"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute></xsl:when></xsl:choose> |
| 248 | <xsl:apply-templates /> |
| 249 | </tr> |
| 250 | </xsl:template> |
| 251 | |
| 252 | <xsl:template match="td"> |
| 253 | <td> |
| 254 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 255 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 256 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 257 | <xsl:apply-templates /> |
| 258 | </td> |
| 259 | </xsl:template> |
| 260 | |
| 261 | <xsl:template match="select"> |
| 262 | <select> |
| 263 | <xsl:choose><xsl:when test="@multiple = 'true'"><xsl:attribute name="multiple"></xsl:attribute></xsl:when></xsl:choose> |
| 264 | <xsl:attribute name="onchange"><xsl:value-of select="$select_onchange_handler"/></xsl:attribute> |
| 265 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 266 | <xsl:choose> |
| 267 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_select, ' ', @class)"/></xsl:attribute></xsl:when> |
| 268 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="$wml_select"/></xsl:attribute></xsl:otherwise> |
| 269 | </xsl:choose> |
| 270 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 271 | <xsl:choose><xsl:when test="@title"><xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute></xsl:when></xsl:choose> |
| 272 | <xsl:choose><xsl:when test="@name"><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute></xsl:when></xsl:choose> |
| 273 | <xsl:choose><xsl:when test="@iname"><xsl:attribute name="data-wml_iname"><xsl:value-of select="@iname"/></xsl:attribute></xsl:when></xsl:choose> |
| 274 | <xsl:choose><xsl:when test="@ivalue"><xsl:attribute name="data-wml_ivalue"><xsl:value-of select="@ivalue"/></xsl:attribute></xsl:when></xsl:choose> |
| 275 | <xsl:apply-templates /> |
| 276 | </select> |
| 277 | </xsl:template> |
| 278 | |
| 279 | <xsl:template match="option"> |
| 280 | <option> |
| 281 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 282 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 283 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 284 | <xsl:choose><xsl:when test="@title"><xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute></xsl:when></xsl:choose> |
| 285 | <xsl:choose><xsl:when test="@value"><xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute></xsl:when></xsl:choose> |
| 286 | <xsl:choose><xsl:when test="@onpick"><xsl:attribute name="data-wml_onpick"><xsl:value-of select="@onpick"/></xsl:attribute></xsl:when></xsl:choose> |
| 287 | <xsl:apply-templates /> |
| 288 | </option> |
| 289 | </xsl:template> |
| 290 | |
| 291 | <xsl:template match="optgroup"> |
| 292 | <optgroup> |
| 293 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 294 | <xsl:choose><xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:when></xsl:choose> |
| 295 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 296 | <xsl:choose><xsl:when test="@title"><xsl:attribute name="label"><xsl:value-of select="@title"/></xsl:attribute></xsl:when></xsl:choose> |
| 297 | <xsl:apply-templates /> |
| 298 | </optgroup> |
| 299 | </xsl:template> |
| 300 | |
| 301 | <xsl:template match="postfield"> |
| 302 | <input type="hidden"> |
| 303 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 304 | <xsl:choose> |
| 305 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_postfield, ' ', @class)"/></xsl:attribute></xsl:when> |
| 306 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="$wml_postfield"/></xsl:attribute></xsl:otherwise> |
| 307 | </xsl:choose> |
| 308 | <xsl:choose><xsl:when test="@name"><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute></xsl:when></xsl:choose> |
| 309 | <xsl:choose><xsl:when test="@value"><xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute></xsl:when></xsl:choose> |
| 310 | </input> |
| 311 | </xsl:template> |
| 312 | |
| 313 | <xsl:template match="input"> |
| 314 | <input> |
| 315 | <xsl:choose> |
| 316 | <xsl:when test="@type"><xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute></xsl:when> |
| 317 | <xsl:otherwise><xsl:attribute name="type"><xsl:value-of select="'text'"/></xsl:attribute></xsl:otherwise> |
| 318 | </xsl:choose> |
| 319 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 320 | <xsl:choose> |
| 321 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_input, ' ', @class)"/></xsl:attribute></xsl:when> |
| 322 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="$wml_input"/></xsl:attribute></xsl:otherwise> |
| 323 | </xsl:choose> |
| 324 | <xsl:choose><xsl:when test="@name"><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute></xsl:when></xsl:choose> |
| 325 | <xsl:choose><xsl:when test="@value"><xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute></xsl:when></xsl:choose> |
Kulanthaivel Palanichamy | 1cb7c13 | 2014-09-16 16:41:20 -0700 | [diff] [blame^] | 326 | <xsl:choose><xsl:when test="@maxlength"><xsl:attribute name="maxLength"><xsl:value-of select="@maxlength"/></xsl:attribute></xsl:when></xsl:choose> |
| 327 | <xsl:choose><xsl:when test="@format"><xsl:attribute name="data-wml_format"><xsl:value-of select="@format"/></xsl:attribute></xsl:when></xsl:choose> |
| 328 | <xsl:choose><xsl:when test="@emptyok = 'false'"><xsl:attribute name="required"></xsl:attribute></xsl:when></xsl:choose> |
| 329 | <xsl:attribute name="data-old_value"></xsl:attribute> |
Kulanthaivel Palanichamy | 8ccd672 | 2014-02-19 15:48:02 -0800 | [diff] [blame] | 330 | </input> |
| 331 | </xsl:template> |
| 332 | |
| 333 | <xsl:template match="timer"> |
| 334 | <span> |
| 335 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 336 | <xsl:choose> |
| 337 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_timer, ' ', @class)"/></xsl:attribute></xsl:when> |
| 338 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="$wml_timer"/></xsl:attribute></xsl:otherwise> |
| 339 | </xsl:choose> |
| 340 | <xsl:choose><xsl:when test="@name"><xsl:attribute name="data-wml_name"><xsl:value-of select="@name"/></xsl:attribute></xsl:when></xsl:choose> |
| 341 | <xsl:choose><xsl:when test="@value"><xsl:attribute name="data-wml_value"><xsl:value-of select="@value"/></xsl:attribute></xsl:when></xsl:choose> |
| 342 | <xsl:apply-templates /> |
| 343 | </span> |
| 344 | </xsl:template> |
| 345 | |
| 346 | <xsl:template match="setvar"> |
| 347 | <span> |
| 348 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 349 | <xsl:choose> |
| 350 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_setvar, ' ', @class)"/></xsl:attribute></xsl:when> |
| 351 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="$wml_setvar"/></xsl:attribute></xsl:otherwise> |
| 352 | </xsl:choose> |
| 353 | <xsl:choose><xsl:when test="@name"><xsl:attribute name="data-wml_name"><xsl:value-of select="@name"/></xsl:attribute></xsl:when></xsl:choose> |
| 354 | <xsl:choose><xsl:when test="@value"><xsl:attribute name="data-wml_value"><xsl:value-of select="@value"/></xsl:attribute></xsl:when></xsl:choose> |
| 355 | </span> |
| 356 | </xsl:template> |
| 357 | |
| 358 | <xsl:template match="do"> |
| 359 | <div> |
| 360 | <xsl:apply-templates /> |
| 361 | </div> |
| 362 | </xsl:template> |
| 363 | |
| 364 | <xsl:template match="do/go"> |
| 365 | <form> |
| 366 | <xsl:attribute name="action"><xsl:value-of select="@href"/></xsl:attribute> |
| 367 | <xsl:choose><xsl:when test="@href"><xsl:attribute name="data-wml_href"><xsl:value-of select="@href"/></xsl:attribute></xsl:when></xsl:choose> |
| 368 | <xsl:choose> |
| 369 | <xsl:when test="@method"><xsl:attribute name="method"><xsl:value-of select="@method"/></xsl:attribute></xsl:when> |
| 370 | <xsl:otherwise><xsl:attribute name="method"><xsl:value-of select="'get'"/></xsl:attribute></xsl:otherwise> |
| 371 | </xsl:choose> |
| 372 | <xsl:apply-templates /> |
| 373 | <input type="button" onclick="executeGoTask(event, this.parentNode)"> |
| 374 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 375 | <xsl:choose> |
| 376 | <xsl:when test="../@label"><xsl:attribute name="value"><xsl:value-of select="../@label"/></xsl:attribute></xsl:when> |
| 377 | <xsl:otherwise> |
| 378 | <xsl:choose> |
| 379 | <xsl:when test="../@name"><xsl:attribute name="value"><xsl:value-of select="../@name" /></xsl:attribute></xsl:when> |
| 380 | <xsl:otherwise><xsl:attribute name="value"><xsl:value-of select="'OK'"/></xsl:attribute></xsl:otherwise> |
| 381 | </xsl:choose> |
| 382 | </xsl:otherwise> |
| 383 | </xsl:choose> |
| 384 | </input> |
| 385 | </form> |
| 386 | </xsl:template> |
| 387 | |
| 388 | <xsl:template match="do/refresh"> |
| 389 | <input type="button" onclick="executeRefreshTask(event, this)"> |
| 390 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 391 | <xsl:choose> |
| 392 | <xsl:when test="../@label"><xsl:attribute name="value"><xsl:value-of select="../@label"/></xsl:attribute></xsl:when> |
| 393 | <xsl:otherwise> |
| 394 | <xsl:choose> |
| 395 | <xsl:when test="../@name"><xsl:attribute name="value"><xsl:value-of select="../@name" /></xsl:attribute></xsl:when> |
| 396 | <xsl:otherwise><xsl:attribute name="value"><xsl:value-of select="'Refresh'"/></xsl:attribute></xsl:otherwise> |
| 397 | </xsl:choose> |
| 398 | </xsl:otherwise> |
| 399 | </xsl:choose> |
| 400 | </input> |
| 401 | <span> |
| 402 | <xsl:apply-templates /> |
| 403 | </span> |
| 404 | </xsl:template> |
| 405 | |
| 406 | <xsl:template match="do/prev"> |
| 407 | <input type="button" onclick="executePrevTask(event, this)"> |
| 408 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 409 | <xsl:choose> |
| 410 | <xsl:when test="../@label"><xsl:attribute name="value"><xsl:value-of select="../@label"/></xsl:attribute></xsl:when> |
| 411 | <xsl:otherwise> |
| 412 | <xsl:choose> |
| 413 | <xsl:when test="../@name"><xsl:attribute name="value"><xsl:value-of select="../@name" /></xsl:attribute></xsl:when> |
| 414 | <xsl:otherwise><xsl:attribute name="value"><xsl:value-of select="'Back'"/></xsl:attribute></xsl:otherwise> |
| 415 | </xsl:choose> |
| 416 | </xsl:otherwise> |
| 417 | </xsl:choose> |
| 418 | </input> |
| 419 | <xsl:apply-templates /> |
| 420 | </xsl:template> |
| 421 | |
| 422 | <xsl:template match="do/noop"> |
| 423 | <span></span> |
| 424 | </xsl:template> |
| 425 | |
| 426 | <xsl:template match="anchor"> |
| 427 | <div> |
| 428 | <xsl:apply-templates /> |
| 429 | </div> |
| 430 | </xsl:template> |
| 431 | |
| 432 | <xsl:template match="anchor/go"> |
| 433 | <form> |
| 434 | <xsl:attribute name="action"><xsl:value-of select="@href"/></xsl:attribute> |
| 435 | <xsl:choose><xsl:when test="@href"><xsl:attribute name="data-wml_href"><xsl:value-of select="@href"/></xsl:attribute></xsl:when></xsl:choose> |
| 436 | <xsl:choose> |
| 437 | <xsl:when test="@method"><xsl:attribute name="method"><xsl:value-of select="@method"/></xsl:attribute></xsl:when> |
| 438 | <xsl:otherwise><xsl:attribute name="method"><xsl:value-of select="'get'"/></xsl:attribute></xsl:otherwise> |
| 439 | </xsl:choose> |
| 440 | <a onclick="executeGoTask(event, this.parentNode)"> |
| 441 | <xsl:choose> |
| 442 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_anchor_task, ' ', @class)"/></xsl:attribute></xsl:when> |
| 443 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="$wml_anchor_task"/></xsl:attribute></xsl:otherwise> |
| 444 | </xsl:choose> |
| 445 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 446 | <xsl:choose><xsl:when test="@href"><xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute></xsl:when></xsl:choose> |
| 447 | <xsl:attribute name="data-wml_task_type"><xsl:value-of select="$wml_task_go"/></xsl:attribute> |
| 448 | <xsl:apply-templates /> |
| 449 | </a> |
| 450 | </form> |
| 451 | </xsl:template> |
| 452 | |
| 453 | <xsl:template match="anchor/prev"> |
| 454 | <xsl:apply-templates /> |
| 455 | <a href="javascript:void(0);" onclick="executePrevTask(event, this)"> |
| 456 | <xsl:choose> |
| 457 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_anchor_task, ' ', @class)"/></xsl:attribute></xsl:when> |
| 458 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="$wml_anchor_task"/></xsl:attribute></xsl:otherwise> |
| 459 | </xsl:choose> |
| 460 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 461 | <xsl:attribute name="data-wml_task_type"><xsl:value-of select="$wml_task_prev"/></xsl:attribute> |
| 462 | </a> |
| 463 | </xsl:template> |
| 464 | |
| 465 | <xsl:template match="anchor/refresh"> |
| 466 | <a href="javascript:void(0);" onclick="executeRefreshTask(event, this)"> |
| 467 | <xsl:choose> |
| 468 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_anchor_task, ' ', @class)"/></xsl:attribute></xsl:when> |
| 469 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="$wml_anchor_task"/></xsl:attribute></xsl:otherwise> |
| 470 | </xsl:choose> |
| 471 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 472 | <xsl:attribute name="data-wml_task_type"><xsl:value-of select="$wml_task_refresh"/></xsl:attribute> |
| 473 | <xsl:apply-templates /> |
| 474 | </a> |
| 475 | </xsl:template> |
| 476 | |
| 477 | <xsl:template match="onevent"> |
| 478 | <div> |
| 479 | <xsl:attribute name="class"><xsl:value-of select="$wml_onevent"/></xsl:attribute> |
| 480 | <xsl:apply-templates /> |
| 481 | </div> |
| 482 | </xsl:template> |
| 483 | |
| 484 | <xsl:template match="onevent/go"> |
| 485 | <form> |
| 486 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 487 | <xsl:choose> |
| 488 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_onevent, '_', ../@type, ' ', @class)"/></xsl:attribute></xsl:when> |
| 489 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="concat($wml_onevent, '_', ../@type)"/></xsl:attribute></xsl:otherwise> |
| 490 | </xsl:choose> |
| 491 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 492 | <xsl:choose><xsl:when test="../@type"><xsl:attribute name="data-wml_onevent_type"><xsl:value-of select="../@type"/></xsl:attribute></xsl:when></xsl:choose> |
| 493 | <xsl:attribute name="data-wml_task_type"><xsl:value-of select="$wml_task_go"/></xsl:attribute> |
| 494 | <xsl:attribute name="action"><xsl:value-of select="@href"/></xsl:attribute> |
| 495 | <xsl:choose><xsl:when test="@href"><xsl:attribute name="data-wml_href"><xsl:value-of select="@href"/></xsl:attribute></xsl:when></xsl:choose> |
| 496 | <xsl:choose> |
| 497 | <xsl:when test="@method"><xsl:attribute name="method"><xsl:value-of select="@method"/></xsl:attribute></xsl:when> |
| 498 | <xsl:otherwise><xsl:attribute name="method"><xsl:value-of select="'get'"/></xsl:attribute></xsl:otherwise> |
| 499 | </xsl:choose> |
| 500 | <xsl:apply-templates /> |
| 501 | </form> |
| 502 | </xsl:template> |
| 503 | |
| 504 | <xsl:template match="onevent/refresh"> |
| 505 | <span> |
| 506 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 507 | <xsl:choose> |
| 508 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_onevent, '_', ../@type, ' ', @class)"/></xsl:attribute></xsl:when> |
| 509 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="concat($wml_onevent, '_', ../@type)"/></xsl:attribute></xsl:otherwise> |
| 510 | </xsl:choose> |
| 511 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 512 | <xsl:choose><xsl:when test="../@type"><xsl:attribute name="data-wml_onevent_type"><xsl:value-of select="../@type"/></xsl:attribute></xsl:when></xsl:choose> |
| 513 | <xsl:attribute name="data-wml_task_type"><xsl:value-of select="$wml_task_refresh"/></xsl:attribute> |
| 514 | <xsl:apply-templates /> |
| 515 | </span> |
| 516 | </xsl:template> |
| 517 | |
| 518 | <xsl:template match="onevent/prev"> |
| 519 | <span> |
| 520 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 521 | <xsl:choose> |
| 522 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_onevent, '_', ../@type, ' ', @class)"/></xsl:attribute></xsl:when> |
| 523 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="concat($wml_onevent, '_', ../@type)"/></xsl:attribute></xsl:otherwise> |
| 524 | </xsl:choose> |
| 525 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 526 | <xsl:choose><xsl:when test="../@type"><xsl:attribute name="data-wml_onevent_type"><xsl:value-of select="../@type"/></xsl:attribute></xsl:when></xsl:choose> |
| 527 | <xsl:attribute name="data-wml_task_type"><xsl:value-of select="$wml_task_prev"/></xsl:attribute> |
| 528 | <xsl:apply-templates /> |
| 529 | </span> |
| 530 | </xsl:template> |
| 531 | |
| 532 | <xsl:template match="onevent/noop"> |
| 533 | <span> |
| 534 | <xsl:choose><xsl:when test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:when></xsl:choose> |
| 535 | <xsl:choose> |
| 536 | <xsl:when test="@class"><xsl:attribute name="class"><xsl:value-of select="concat($wml_onevent, '_', ../@type, ' ', @class)"/></xsl:attribute></xsl:when> |
| 537 | <xsl:otherwise><xsl:attribute name="class"><xsl:value-of select="concat($wml_onevent, '_', ../@type)"/></xsl:attribute></xsl:otherwise> |
| 538 | </xsl:choose> |
| 539 | <xsl:choose><xsl:when test="@lang"><xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute></xsl:when></xsl:choose> |
| 540 | <xsl:choose><xsl:when test="../@type"><xsl:attribute name="data-wml_onevent_type"><xsl:value-of select="../@type"/></xsl:attribute></xsl:when></xsl:choose> |
| 541 | <xsl:attribute name="data-wml_task_type"><xsl:value-of select="$wml_task_noop"/></xsl:attribute> |
| 542 | <xsl:apply-templates /> |
| 543 | </span> |
| 544 | </xsl:template> |
| 545 | |
| 546 | </xsl:stylesheet> |