[22458] | 1 | <!--
|
---|
| 2 | Copyright (c) 2001-2009, Evan Lenz
|
---|
| 3 | All rights reserved.
|
---|
| 4 |
|
---|
| 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
---|
| 6 |
|
---|
| 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
---|
| 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
---|
| 9 | * Neither the name of Lenz Consulting Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
---|
| 10 |
|
---|
| 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
| 12 |
|
---|
| 13 | Recent changes:
|
---|
| 14 |
|
---|
| 15 | 2010-06-10: Added the $force-exclude-all-namespaces parameter
|
---|
| 16 | 2009-10-19: Added the $exclude-these-namespaces parameter
|
---|
| 17 | 2009-10-08: Added $att-value parameter and template name to template rule for attributes.
|
---|
| 18 |
|
---|
| 19 | -->
|
---|
| 20 | <xsl:stylesheet version="1.0"
|
---|
[22473] | 21 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
[22569] | 22 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
| 23 | xmlns:exsl="http://exslt.org/common"
|
---|
| 24 | extension-element-prefixes="exsl" >
|
---|
[22458] | 25 |
|
---|
[22473] | 26 | <xsl:output omit-xml-declaration="yes"/>
|
---|
[22458] | 27 |
|
---|
[22473] | 28 | <xsl:template name="xml-to-gui">
|
---|
| 29 | <xsl:param name="node-set" select="."/>
|
---|
| 30 | <xsl:param name="metadataSets" select="."/>
|
---|
[22458] | 31 |
|
---|
[22473] | 32 | <xsl:value-of select="metadataSets[@name]"/>
|
---|
| 33 | <xsl:apply-templates select="$node-set" mode="xml-to-gui">
|
---|
| 34 | <xsl:with-param name="depth" select="1"/>
|
---|
| 35 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 36 | </xsl:apply-templates>
|
---|
| 37 | </xsl:template>
|
---|
[22458] | 38 |
|
---|
[22473] | 39 | <xsl:template match="/" mode="xml-to-gui">
|
---|
| 40 | <xsl:param name="depth"/>
|
---|
| 41 | <xsl:param name="metadataSets"/>
|
---|
| 42 |
|
---|
| 43 | <xsl:apply-templates mode="xml-to-gui">
|
---|
| 44 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 45 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 46 | </xsl:apply-templates>
|
---|
| 47 | </xsl:template>
|
---|
[22569] | 48 | <!-- **************************************************************************** -->
|
---|
[22458] | 49 |
|
---|
[22516] | 50 | <!-- **************************************************************************** -->
|
---|
| 51 | <!-- COMBO BOX CREATION -->
|
---|
| 52 | <!-- **************************************************************************** -->
|
---|
[22458] | 53 |
|
---|
[22473] | 54 | <xsl:template name="meta-to-combo">
|
---|
| 55 | <xsl:param name="metadataSets" select='.'/>
|
---|
[23255] | 56 | <xsl:param name="current" select='.'/>
|
---|
[22458] | 57 |
|
---|
[22473] | 58 | <xsl:variable name="current_mod">
|
---|
| 59 | <xsl:choose>
|
---|
| 60 | <xsl:when test="contains($current,'.')"><xsl:value-of select="$current"/></xsl:when>
|
---|
[23255] | 61 | <xsl:when test="$current!=''">ex.<xsl:value-of select="$current"/></xsl:when>
|
---|
| 62 | <xsl:otherwise>ex.Title</xsl:otherwise>
|
---|
[22473] | 63 | </xsl:choose>
|
---|
| 64 | </xsl:variable>
|
---|
| 65 |
|
---|
[23255] | 66 | <xsl:variable name="exists">
|
---|
| 67 | <xsl:apply-templates select="$metadataSets" mode="search-meta-to-combo">
|
---|
| 68 | <xsl:with-param name="current" select="$current_mod"/> <!--<xsl:copy-of select="$current_mod"/></xsl:with-param> -->
|
---|
| 69 | </xsl:apply-templates>
|
---|
| 70 | </xsl:variable>
|
---|
[22473] | 71 |
|
---|
[23255] | 72 | <xsl:choose>
|
---|
| 73 | <xsl:when test="$exists='TRUE'">
|
---|
[24137] | 74 | <select name="meta_select" onChange="onSelectChange(this)">
|
---|
[23255] | 75 | <xsl:apply-templates select="$metadataSets" mode="meta-to-combo">
|
---|
| 76 | <xsl:with-param name="current" select="$current_mod"/>
|
---|
| 77 | </xsl:apply-templates>
|
---|
| 78 | </select>
|
---|
| 79 | </xsl:when>
|
---|
| 80 | <xsl:otherwise>
|
---|
| 81 | <xsl:value-of select="$current_mod"/>
|
---|
| 82 | </xsl:otherwise>
|
---|
| 83 | </xsl:choose>
|
---|
| 84 |
|
---|
[22473] | 85 | </xsl:template>
|
---|
| 86 |
|
---|
[23255] | 87 | <xsl:template match="metadataSet" mode="search-meta-to-combo">
|
---|
| 88 | <xsl:param name="current"/>
|
---|
| 89 |
|
---|
| 90 | <xsl:variable name="set"><xsl:value-of select="substring-before($current, '.')"/></xsl:variable>
|
---|
| 91 |
|
---|
| 92 | <xsl:if test="@name=$set">
|
---|
| 93 | <xsl:apply-templates select="metadata" mode="search-meta-to-combo">
|
---|
| 94 | <!-- <xsl:with-param name="set" select="@name"/> --> <!-- name of the set -->
|
---|
| 95 | <xsl:with-param name="current" select="$current"/>
|
---|
| 96 | </xsl:apply-templates>
|
---|
| 97 | </xsl:if>
|
---|
| 98 | </xsl:template>
|
---|
| 99 |
|
---|
| 100 | <xsl:template match="metadata" mode="search-meta-to-combo">
|
---|
| 101 | <xsl:param name="current"/>
|
---|
| 102 | <xsl:variable name="cur"><xsl:value-of select="substring-after($current, '.')"/></xsl:variable>
|
---|
| 103 | <xsl:if test="@name=$cur">TRUE</xsl:if>
|
---|
| 104 | </xsl:template>
|
---|
| 105 |
|
---|
| 106 | <xsl:template match="*" mode="search-meta-to-combo">
|
---|
| 107 | <xsl:param name="current"/>
|
---|
| 108 | <xsl:apply-templates mode="search-meta-to-combo">
|
---|
| 109 | <xsl:with-param name="current" select="$current"/>
|
---|
| 110 | </xsl:apply-templates>
|
---|
| 111 | </xsl:template>
|
---|
| 112 |
|
---|
[22473] | 113 | <xsl:template match="metadataSet" mode="meta-to-combo">
|
---|
| 114 | <xsl:param name="current"/>
|
---|
| 115 |
|
---|
| 116 | <xsl:apply-templates mode="meta-to-combo">
|
---|
[23255] | 117 | <xsl:with-param name="set" select="@name"/> <!-- name of the set -->
|
---|
[22473] | 118 | <xsl:with-param name="current" select="$current"/>
|
---|
| 119 | </xsl:apply-templates>
|
---|
| 120 | </xsl:template>
|
---|
| 121 |
|
---|
| 122 | <xsl:template match="metadata" mode="meta-to-combo">
|
---|
| 123 | <xsl:param name="set"/>
|
---|
| 124 | <xsl:param name="current"/>
|
---|
[22516] | 125 |
|
---|
[22473] | 126 | <xsl:variable name="meta"><xsl:value-of select="$set"/>.<xsl:value-of select="@name"/></xsl:variable>
|
---|
| 127 |
|
---|
[22458] | 128 | <xsl:choose>
|
---|
[22473] | 129 | <xsl:when test="$current = $meta">
|
---|
[23340] | 130 | <xsl:text disable-output-escaping="yes"><option value="</xsl:text><xsl:value-of select="$meta"/><xsl:text disable-output-escaping="yes">" selected="selected"></xsl:text><xsl:value-of select="$meta"/><xsl:text disable-output-escaping="yes"></option></xsl:text>
|
---|
[23135] | 131 | <!-- <option value ="{$meta}" selected="selected"><xsl:value-of select="$meta"/></option> -->
|
---|
[22473] | 132 | </xsl:when>
|
---|
| 133 | <xsl:otherwise>
|
---|
[22516] | 134 | <option value ="{$meta}"><xsl:value-of select="$meta"/></option>
|
---|
[22473] | 135 | </xsl:otherwise>
|
---|
[22458] | 136 | </xsl:choose>
|
---|
[22473] | 137 | </xsl:template>
|
---|
[22458] | 138 |
|
---|
[22473] | 139 | <xsl:template match="*" mode="meta-to-combo">
|
---|
| 140 | <xsl:param name="current"/>
|
---|
| 141 | <xsl:apply-templates mode="meta-to-combo">
|
---|
| 142 | <xsl:with-param name="current" select="$current"/>
|
---|
| 143 | </xsl:apply-templates>
|
---|
| 144 | </xsl:template>
|
---|
[22458] | 145 |
|
---|
| 146 |
|
---|
[22516] | 147 | <!-- **************************************************************************** -->
|
---|
| 148 |
|
---|
| 149 | <!-- **************************************************************************** -->
|
---|
| 150 | <!-- GSF STATEMENTS -->
|
---|
| 151 | <!-- **************************************************************************** -->
|
---|
| 152 |
|
---|
| 153 |
|
---|
| 154 | <!-- ********** GSF:CHOOSE-METADATA ********** -->
|
---|
| 155 | <xsl:template match="gsf:choose-metadata" mode="xml-to-gui">
|
---|
| 156 | <xsl:param name="depth"/>
|
---|
| 157 | <xsl:param name="metadataSets"/>
|
---|
[22569] | 158 |
|
---|
[22598] | 159 | <div class="gsf_choose_metadata css_gsf_choose_metadata block" title="gsf:choose-metadata">
|
---|
[22987] | 160 | <table class="header"><tbody><tr><td class="header">CHOOSE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table>
|
---|
[22516] | 161 | <xsl:apply-templates mode="xml-to-gui">
|
---|
| 162 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 163 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 164 | </xsl:apply-templates>
|
---|
[22569] | 165 | </div>
|
---|
[22516] | 166 | </xsl:template>
|
---|
| 167 |
|
---|
| 168 |
|
---|
| 169 | <!-- ********** GSF:METADATA ********** -->
|
---|
| 170 | <xsl:template match="gsf:metadata" mode="xml-to-gui">
|
---|
| 171 | <xsl:param name="depth"/>
|
---|
| 172 | <xsl:param name="metadataSets"/>
|
---|
| 173 |
|
---|
[23255] | 174 | <!-- DEBUG metadata: <xsl:value-of select="@name"/>eol -->
|
---|
| 175 |
|
---|
[22768] | 176 | <div class="gsf_metadata css_gsf_metadata block leaf" title="gsf:metadata">
|
---|
| 177 | <xsl:variable name="combo">
|
---|
| 178 | <xsl:call-template name="meta-to-combo">
|
---|
[22569] | 179 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 180 | <xsl:with-param name="current" select="@name"/>
|
---|
[22768] | 181 | </xsl:call-template>
|
---|
| 182 | </xsl:variable>
|
---|
[22987] | 183 | <table class="header"><tbody><tr><td class="header"><xsl:copy-of select="$combo"/></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table>
|
---|
[22516] | 184 | </div>
|
---|
| 185 | </xsl:template>
|
---|
| 186 |
|
---|
| 187 |
|
---|
| 188 | <!-- ********** GSF:LINK ********** -->
|
---|
[22473] | 189 | <xsl:template match="gsf:link" mode="xml-to-gui">
|
---|
| 190 | <xsl:param name="depth"/>
|
---|
| 191 | <xsl:param name="metadataSets"/>
|
---|
[22569] | 192 |
|
---|
| 193 | <div class="gsf_link css_gsf_link block" title="gsf:link">
|
---|
[22768] | 194 | <xsl:variable name="link">
|
---|
[24137] | 195 | LINK<select name="link_select" onChange="onSelectChange(this)">
|
---|
[22473] | 196 | <xsl:choose>
|
---|
| 197 | <xsl:when test="@type='document'">
|
---|
[23336] | 198 | <option value = "document" selected = "selected">Document</option>
|
---|
[22473] | 199 | <option value = "classifier">Classifier</option>
|
---|
| 200 | <option value = "source">Source</option>
|
---|
| 201 | </xsl:when>
|
---|
| 202 | <xsl:when test="@type='classifier'">
|
---|
[23336] | 203 | <option value = "classifier" selected = "selected">Classifier</option>
|
---|
[22473] | 204 | <option value = "document">Document</option>
|
---|
| 205 | <option value = "source">Source</option>
|
---|
| 206 | </xsl:when>
|
---|
| 207 | <xsl:when test="@type='source'">
|
---|
[23336] | 208 | <option value = "source" selected = "selected">Source</option>
|
---|
[22473] | 209 | <option value ="document">Document</option>
|
---|
| 210 | <option value ="classifier">Classifier</option>
|
---|
| 211 | </xsl:when>
|
---|
| 212 | <xsl:when test="@type='horizontal'">
|
---|
[23336] | 213 | <option value = "horizontal" selected = "selected">Horizontal</option>
|
---|
| 214 | <option value = "source">Source</option>
|
---|
[22473] | 215 | <option value ="document">Document</option>
|
---|
| 216 | <option value ="classifier">Classifier</option>
|
---|
| 217 | </xsl:when>
|
---|
| 218 | </xsl:choose>
|
---|
[22987] | 219 | </select>
|
---|
[22768] | 220 | </xsl:variable>
|
---|
[22987] | 221 | <table class="header"><tbody><tr><td class="header"><xsl:copy-of select="$link"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table>
|
---|
[22473] | 222 | <xsl:apply-templates mode="xml-to-gui">
|
---|
| 223 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 224 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 225 | </xsl:apply-templates>
|
---|
| 226 | </div>
|
---|
| 227 | </xsl:template>
|
---|
[22458] | 228 |
|
---|
[22516] | 229 |
|
---|
| 230 | <!-- ********** GSF:TEMPLATE ********** -->
|
---|
[22473] | 231 | <xsl:template match="gsf:template" mode="xml-to-gui">
|
---|
| 232 | <xsl:param name="depth"/>
|
---|
| 233 | <xsl:param name="metadataSets"/>
|
---|
[22458] | 234 |
|
---|
[22598] | 235 | <div class="gsf_template css_gsf_template block" title="gsf:template">
|
---|
[22768] | 236 | <xsl:variable name="mode">
|
---|
| 237 | <xsl:choose>
|
---|
[23551] | 238 | <xsl:when test="not(@mode)">MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="vertical" onChange="onTextChange(this, this.value)"><xsl:text></xsl:text></input></xsl:when>
|
---|
| 239 | <xsl:otherwise>MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="{@mode}" onChange="onTextChange(this, this.value)"/></xsl:otherwise>
|
---|
[22768] | 240 | </xsl:choose>
|
---|
| 241 | </xsl:variable>
|
---|
| 242 |
|
---|
[23551] | 243 | <table class="header"><tbody><tr><td class="header">MATCH=<input class="match" type="text" name="rawtextinput" size="10" value="{@match}" onChange="onTextChange(this, this.value)"/></td><td class="header"><xsl:copy-of select="$mode"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-plusthick" title="Click me to expand">[+]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table>
|
---|
[22768] | 244 |
|
---|
[22676] | 245 | <table class="table" border="1">
|
---|
| 246 | <tbody>
|
---|
[22569] | 247 | <tr class="tr">
|
---|
[22829] | 248 | <td class="droppable" width="10px"></td>
|
---|
[22473] | 249 | <xsl:apply-templates mode="xml-to-gui">
|
---|
| 250 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 251 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 252 | </xsl:apply-templates>
|
---|
[22569] | 253 | </tr>
|
---|
[22676] | 254 | </tbody>
|
---|
[22569] | 255 | </table>
|
---|
[23336] | 256 | </div>
|
---|
[22473] | 257 | </xsl:template>
|
---|
[22458] | 258 |
|
---|
[22516] | 259 | <!-- ********** GSF:SWITCH ********** -->
|
---|
| 260 | <xsl:template match="gsf:switch" mode="xml-to-gui">
|
---|
| 261 | <xsl:param name="depth"/>
|
---|
| 262 | <xsl:param name="metadataSets"/>
|
---|
| 263 |
|
---|
[22598] | 264 | <div class="gsf_switch css_gsf_switch block" title="gsf:switch">
|
---|
[24420] | 265 | <table class="header"><tbody><tr><td class="header">SWITCH</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td class="header"><a href="#" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>
|
---|
[22516] | 266 | <xsl:apply-templates mode="xml-to-gui">
|
---|
| 267 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 268 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 269 | </xsl:apply-templates>
|
---|
| 270 | </div>
|
---|
| 271 | </xsl:template>
|
---|
| 272 |
|
---|
| 273 |
|
---|
| 274 | <!-- ********** GSF:WHEN ********** -->
|
---|
[22473] | 275 | <xsl:template match="gsf:when" mode="xml-to-gui">
|
---|
| 276 | <xsl:param name="depth"/>
|
---|
| 277 | <xsl:param name="metadataSets"/>
|
---|
[22458] | 278 |
|
---|
[22598] | 279 | <div class="gsf_when css_gsf_when block" title="gsf:when">
|
---|
[22987] | 280 | <table class="header"><tbody><tr><td class="header">WHEN<xsl:value-of select="@test"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>
|
---|
[22473] | 281 | <xsl:apply-templates mode="xml-to-gui">
|
---|
| 282 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 283 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 284 | </xsl:apply-templates>
|
---|
| 285 | </div>
|
---|
| 286 | </xsl:template>
|
---|
[22458] | 287 |
|
---|
[22516] | 288 |
|
---|
| 289 | <!-- ********** GSF:OTHERWISE ********** -->
|
---|
[22473] | 290 | <xsl:template match="gsf:otherwise" mode="xml-to-gui">
|
---|
| 291 | <xsl:param name="depth"/>
|
---|
| 292 | <xsl:param name="metadataSets"/>
|
---|
[22458] | 293 |
|
---|
[22598] | 294 | <div class="gsf_otherwise css_gsf_otherwise block" title="gsf:otherwise">
|
---|
[23255] | 295 | <table class="header"><tbody><tr><td class="header">OTHERWISE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td class="header"><a href="#" class="remove">[x]</a></td><td><a href="#" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>
|
---|
[22473] | 296 | <xsl:apply-templates mode="xml-to-gui">
|
---|
| 297 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 298 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 299 | </xsl:apply-templates>
|
---|
| 300 | </div>
|
---|
| 301 | </xsl:template>
|
---|
[22458] | 302 |
|
---|
[22516] | 303 |
|
---|
| 304 | <!-- ********** GSF:ICON ********** -->
|
---|
[22473] | 305 | <xsl:template match="gsf:icon" mode="xml-to-gui">
|
---|
| 306 | <xsl:param name="depth"/>
|
---|
| 307 | <xsl:param name="metadataSets"/>
|
---|
| 308 |
|
---|
[22598] | 309 | <div class="gsf_icon css_gsf_icon block leaf" title="gsf:icon">
|
---|
[22768] | 310 | <xsl:variable name="icon">
|
---|
[24137] | 311 | ICON<select name="icon_select" onChange="onSelectChange(this, this.value)">
|
---|
[22516] | 312 | <xsl:choose>
|
---|
| 313 | <xsl:when test="@type='document'">
|
---|
[23336] | 314 | <option value = "document" selected = "selected">Document</option>
|
---|
[22516] | 315 | <option value = "classifier">Classifier</option>
|
---|
| 316 | <option value = "source">Source</option>
|
---|
| 317 | </xsl:when>
|
---|
| 318 | <xsl:when test="@type='classifier'">
|
---|
[23336] | 319 | <option value = "classifier" selected = "selected">Classifier</option>
|
---|
[22516] | 320 | <option value = "document">Document</option>
|
---|
| 321 | <option value = "source">Source</option>
|
---|
| 322 | </xsl:when>
|
---|
| 323 | <xsl:when test="@type='source'">
|
---|
[23336] | 324 | <option value = "source" selected = "selected">Source</option>
|
---|
[22516] | 325 | <option value ="document">Document</option>
|
---|
| 326 | <option value ="classifier">Classifier</option>
|
---|
| 327 | </xsl:when>
|
---|
| 328 | </xsl:choose>
|
---|
[22987] | 329 | </select>
|
---|
[22768] | 330 | </xsl:variable>
|
---|
[22987] | 331 | <table class="header"><tbody><tr><td class="header"><xsl:copy-of select="$icon"/></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table>
|
---|
[22473] | 332 | </div>
|
---|
| 333 | </xsl:template>
|
---|
| 334 |
|
---|
| 335 |
|
---|
[22516] | 336 | <!-- ********** GSF:DEFAULT ********** -->
|
---|
[22473] | 337 | <xsl:template match="gsf:default" mode="xml-to-gui">
|
---|
| 338 | <xsl:param name="depth"/>
|
---|
| 339 | <xsl:param name="metadataSets"/>
|
---|
| 340 |
|
---|
[22933] | 341 | <div class="block gsf_default" title="gsf:default">
|
---|
[22987] | 342 | <table class="header"><tbody><tr><td class="header">DEFAULT</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>
|
---|
[22473] | 343 | <xsl:apply-templates mode="xml-to-gui">
|
---|
| 344 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 345 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 346 | </xsl:apply-templates>
|
---|
| 347 | </div>
|
---|
| 348 | </xsl:template>
|
---|
| 349 |
|
---|
[22516] | 350 |
|
---|
| 351 | <!-- ********** TEXT ********** -->
|
---|
[22473] | 352 | <xsl:template match="text()" mode="xml-to-gui">
|
---|
| 353 | <xsl:param name="depth"/>
|
---|
| 354 | <xsl:param name="metadataSets"/>
|
---|
| 355 |
|
---|
[24137] | 356 | <xsl:variable name="rawtext"><xsl:value-of select="."/></xsl:variable>
|
---|
| 357 |
|
---|
| 358 | <xsl:if test="normalize-space($rawtext) != '' ">
|
---|
| 359 | <div class="block leaf gsf_text" title="gsf:text">
|
---|
| 360 | <table class="header">
|
---|
| 361 | <tbody>
|
---|
| 362 | <tr>
|
---|
| 363 | <td class="header">
|
---|
| 364 | <input class="text" type="text" name="rawtextinput" size="10" value="{$rawtext}" onChange="onTextChange(this, this.value)"></input>
|
---|
| 365 | </td>
|
---|
| 366 | <td class="header">
|
---|
| 367 | <a href="[myhref]" class="ui-icon ui-icon-closethick"/>
|
---|
| 368 | </td>
|
---|
| 369 | </tr>
|
---|
| 370 | </tbody>
|
---|
| 371 | </table>
|
---|
| 372 | </div>
|
---|
| 373 | </xsl:if>
|
---|
[22473] | 374 | </xsl:template>
|
---|
| 375 |
|
---|
[22516] | 376 |
|
---|
| 377 | <!-- ********** TABLE ********** -->
|
---|
[22473] | 378 | <xsl:template match="td" mode="xml-to-gui">
|
---|
| 379 | <xsl:param name="depth"/>
|
---|
| 380 | <xsl:param name="metadataSets"/>
|
---|
[22569] | 381 |
|
---|
[23046] | 382 | <td class="column" valign="{@valign}" title="td">
|
---|
[24420] | 383 | <div class="td-div" title="td-div">
|
---|
| 384 | <div class="neverempty block" style="height:25px">NEVER EMPTY</div>
|
---|
[22829] | 385 |
|
---|
[22516] | 386 | <xsl:apply-templates mode="xml-to-gui">
|
---|
| 387 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 388 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 389 | </xsl:apply-templates>
|
---|
[22569] | 390 | </div>
|
---|
| 391 | </td>
|
---|
[22768] | 392 | <td class="droppable" width="10px" title="Drag a new column on to me"/>
|
---|
[22473] | 393 | </xsl:template>
|
---|
[22458] | 394 |
|
---|
[22516] | 395 |
|
---|
| 396 | <!-- ********** BREAK ********** -->
|
---|
[22473] | 397 | <xsl:template match="br" mode="xml-to-gui">
|
---|
| 398 | <xsl:param name="depth"/>
|
---|
| 399 | <xsl:param name="metadataSets"/>
|
---|
| 400 |
|
---|
[23357] | 401 | <div class="block leaf gsf_text" title="gsf:text">
|
---|
[23360] | 402 | <table class="header"><tbody><tr><td class="header"><<input class="text" type="text" name="rawtextinput" size="10" value="br/"></input>></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>
|
---|
[23357] | 403 | </div>
|
---|
[22473] | 404 |
|
---|
[22458] | 405 | <xsl:apply-templates mode="xml-to-gui">
|
---|
[22473] | 406 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 407 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
[22458] | 408 | </xsl:apply-templates>
|
---|
[22473] | 409 | </xsl:template>
|
---|
[22458] | 410 |
|
---|
[23357] | 411 | <!-- ********** Italics ********** -->
|
---|
| 412 | <xsl:template match="i" mode="xml-to-gui">
|
---|
| 413 | <xsl:param name="depth"/>
|
---|
| 414 | <xsl:param name="metadataSets"/>
|
---|
[22516] | 415 |
|
---|
[23357] | 416 | <div class="block leaf gsf_text" title="gsf:text">
|
---|
[23360] | 417 | <table class="header"><tbody><tr><td class="header"><<input class="text" type="text" name="rawtextinput" size="10" value="i"></input>></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>
|
---|
[23357] | 418 | </div>
|
---|
| 419 |
|
---|
| 420 | <xsl:apply-templates mode="xml-to-gui">
|
---|
| 421 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 422 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 423 | </xsl:apply-templates>
|
---|
| 424 |
|
---|
| 425 | <div class="block leaf gsf_text" title="gsf:text">
|
---|
[23360] | 426 | <xsl:variable name="rawtext"><xsl:text disable-output-escaping='no'>/i</xsl:text></xsl:variable>
|
---|
| 427 | <table class="header"><tbody><tr><td class="header"><<input class="text" type="text" name="rawtextinput" size="10" value="{$rawtext}"></input>></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>
|
---|
[23357] | 428 | </div>
|
---|
| 429 |
|
---|
| 430 | </xsl:template>
|
---|
| 431 |
|
---|
[22516] | 432 | <!-- ********** MATCH ALL ********** -->
|
---|
[22473] | 433 | <xsl:template match="*" mode="xml-to-gui">
|
---|
| 434 | <xsl:param name="depth"/>
|
---|
| 435 | <xsl:param name="metadataSets"/>
|
---|
[22458] | 436 |
|
---|
[22473] | 437 | <xsl:apply-templates mode="xml-to-gui">
|
---|
| 438 | <xsl:with-param name="depth" select="$depth"/>
|
---|
| 439 | <xsl:with-param name="metadataSets" select="$metadataSets"/>
|
---|
| 440 | </xsl:apply-templates>
|
---|
| 441 | </xsl:template>
|
---|
[22458] | 442 |
|
---|
| 443 | </xsl:stylesheet>
|
---|