| | 201 | <xsl:template match="stub:itemframe" name="stub:itemframe"> |
|---|
| | 202 | <div> |
|---|
| | 203 | <xsl:attribute name="class"> |
|---|
| | 204 | <xsl:choose> |
|---|
| | 205 | <xsl:when test="@class and not(@class = '')"> |
|---|
| | 206 | <xsl:text>itemframe </xsl:text> |
|---|
| | 207 | <xsl:value-of select="@class"/> |
|---|
| | 208 | </xsl:when> |
|---|
| | 209 | <xsl:otherwise> |
|---|
| | 210 | <xsl:text>itemframe</xsl:text> |
|---|
| | 211 | </xsl:otherwise> |
|---|
| | 212 | </xsl:choose> |
|---|
| | 213 | </xsl:attribute> |
|---|
| | 214 | <xsl:copy-of select="@*[local-name() != 'class']"/> |
|---|
| | 215 | <xsl:apply-templates select="node()"> |
|---|
| | 216 | <xsl:with-param name="id" select="@id"/> |
|---|
| | 217 | </xsl:apply-templates> |
|---|
| | 218 | </div> |
|---|
| | 219 | </xsl:template> |
|---|
| | 220 | |
|---|
| | 221 | <xsl:template match="stub:item" name="stub:item"> |
|---|
| | 222 | <xsl:param name="id" select="@id"/> |
|---|
| | 223 | <li> |
|---|
| | 224 | <label> |
|---|
| | 225 | <xsl:attribute name="for"> |
|---|
| | 226 | <xsl:value-of select="$id"/> |
|---|
| | 227 | <xsl:text>.</xsl:text> |
|---|
| | 228 | <xsl:value-of select="@name"/> |
|---|
| | 229 | </xsl:attribute> |
|---|
| | 230 | <xsl:if test="not(@type = 'submit')"> |
|---|
| | 231 | <xsl:call-template name="stub:include"> |
|---|
| | 232 | <xsl:with-param name="part"> |
|---|
| | 233 | <xsl:value-of select="$id"/> |
|---|
| | 234 | <xsl:text>.</xsl:text> |
|---|
| | 235 | <xsl:value-of select="@name"/> |
|---|
| | 236 | </xsl:with-param> |
|---|
| | 237 | </xsl:call-template> |
|---|
| | 238 | </xsl:if> |
|---|
| | 239 | <xsl:if test="@mandatory = 'true'"><xsl:text>*</xsl:text></xsl:if> |
|---|
| | 240 | </label> |
|---|
| | 241 | <xsl:choose> |
|---|
| | 242 | <xsl:when test="@type = 'text'"> |
|---|
| | 243 | <input> |
|---|
| | 244 | <xsl:attribute name="id"> |
|---|
| | 245 | <xsl:value-of select="$id"/> |
|---|
| | 246 | <xsl:text>.</xsl:text> |
|---|
| | 247 | <xsl:value-of select="@name"/> |
|---|
| | 248 | </xsl:attribute> |
|---|
| | 249 | <xsl:copy-of select="@*[local-name() != 'id' and local-name() != 'name']"/> |
|---|
| | 250 | </input> |
|---|
| | 251 | </xsl:when> |
|---|
| | 252 | <xsl:when test="@type = 'select'"> |
|---|
| | 253 | <select> |
|---|
| | 254 | <xsl:attribute name="id"> |
|---|
| | 255 | <xsl:value-of select="$id"/> |
|---|
| | 256 | <xsl:text>.</xsl:text> |
|---|
| | 257 | <xsl:value-of select="@name"/> |
|---|
| | 258 | </xsl:attribute> |
|---|
| | 259 | <xsl:copy-of select="@*[local-name() != 'id' and local-name() != 'name']"/> |
|---|
| | 260 | <xsl:apply-templates select="node()"> |
|---|
| | 261 | <xsl:with-param name="id" select="@id"/> |
|---|
| | 262 | </xsl:apply-templates> |
|---|
| | 263 | </select> |
|---|
| | 264 | </xsl:when> |
|---|
| | 265 | <xsl:when test="@type = 'textarea'"> |
|---|
| | 266 | <textarea> |
|---|
| | 267 | <xsl:attribute name="id"> |
|---|
| | 268 | <xsl:value-of select="$id"/> |
|---|
| | 269 | <xsl:text>.</xsl:text> |
|---|
| | 270 | <xsl:value-of select="@name"/> |
|---|
| | 271 | </xsl:attribute> |
|---|
| | 272 | <xsl:copy-of select="@*[local-name() != 'id' and local-name() != 'name']"/> |
|---|
| | 273 | <xsl:apply-templates select="text()"/> |
|---|
| | 274 | </textarea> |
|---|
| | 275 | </xsl:when> |
|---|
| | 276 | <xsl:when test="@type = 'submit'"> |
|---|
| | 277 | <input> |
|---|
| | 278 | <xsl:copy-of select="@*"/> |
|---|
| | 279 | </input> |
|---|
| | 280 | </xsl:when> |
|---|
| | 281 | <xsl:otherwise> |
|---|
| | 282 | <xsl:text>[ Unknown Item-Type! ]</xsl:text> |
|---|
| | 283 | </xsl:otherwise> |
|---|
| | 284 | </xsl:choose> |
|---|
| | 285 | </li> |
|---|
| | 286 | </xsl:template> |
|---|
| | 287 | |
|---|
| | 288 | <xsl:template match="stub:option" name="stub:option"> |
|---|
| | 289 | <xsl:param name="id" select="@id"/> |
|---|
| | 290 | <option> |
|---|
| | 291 | <xsl:copy-of select="@*"/> |
|---|
| | 292 | <xsl:apply-templates select="text()"/> |
|---|
| | 293 | </option> |
|---|
| | 294 | </xsl:template> |
|---|
| | 295 | |
|---|