source: main/trunk/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui-templates.xsl@ 22676

Last change on this file since 22676 was 22676, checked in by sjb48, 14 years ago

Working on auto-resizing tables and column insertion. Partially working.

File size: 7.2 KB
Line 
1<!--
2Copyright (c) 2001-2009, Evan Lenz
3All rights reserved.
4
5Redistribution 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
13Recent changes:
14
152010-06-10: Added the $force-exclude-all-namespaces parameter
162009-10-19: Added the $exclude-these-namespaces parameter
172009-10-08: Added $att-value parameter and template name to template rule for attributes.
18
19-->
20<xsl:stylesheet version="1.0"
21 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
22 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
23 xmlns:exsl="http://exslt.org/common"
24 extension-element-prefixes="exsl" >
25
26 <xsl:output omit-xml-declaration="yes"/>
27
28 <xsl:template name="xml-to-gui-templates">
29 <xsl:param name="node-set" select="."/>
30 <xsl:param name="metadataSets" select="."/>
31 <!-- **************************************************************************** -->
32 <!-- GSF STATEMENTS -->
33 <!-- **************************************************************************** -->
34
35
36 <!-- ********** GSF:CHOOSE-METADATA ********** -->
37 <xsl:variable name="choose_metadata">
38 <div class="gsf_choose_metadata css_gsf_choose_metadata block" title="gsf:choose-metadata">CHOOSE <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a></div>
39 </xsl:variable>
40
41 <script type="text/javascript">
42 gsf_choose_metadata_element = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$choose_metadata"/><xsl:text disable-output-escaping="yes">';</xsl:text>
43 </script>
44
45
46 <!-- ********** GSF:METADATA ********** -->
47 <xsl:variable name="metadata">
48 <div class="gsf_metadata css_gsf_metadata block leaf" title="gsf:metadata"><xsl:call-template name="meta-to-combo">
49 <xsl:with-param name="metadataSets" select="$metadataSets"/>
50 <xsl:with-param name="current" select="ex.title"/>
51 </xsl:call-template><a href="#" class="remove">[x]</a></div>
52 </xsl:variable>
53
54 <script type="text/javascript">
55 gsf_metadata_element = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$metadata"/><xsl:text disable-output-escaping="yes">';</xsl:text>
56 </script>
57
58
59 <!-- ********** GSF:LINK ********** -->
60 <xsl:variable name="link">
61 <div class="gsf_link css_gsf_link block" title="gsf:link">LINK[type=<select>
62 <option value = "document" selected = "document">Document</option>
63 <option value = "classifier">Classifier</option>
64 <option value = "source">Source</option>
65 <option value = "horizontal">Horizontal</option>
66 </select>]<a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a></div>
67 </xsl:variable>
68
69 <script type="text/javascript">
70 gsf_link_element = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$link"/><xsl:text disable-output-escaping="yes">';</xsl:text>
71 </script>
72
73
74 <!-- ********** GSF:TEMPLATE ********** -->
75
76 <xsl:variable name="template">
77 <div class="gsf_template block" title="gsf:template">MATCH=<input type="text" name="rawtextinput" size="10"/><a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a><table border="1"><tr class="tr"></tr></table></div><br/>
78 </xsl:variable>
79
80 <script type="text/javascript">
81 gsf_template_element = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$template"/><xsl:text disable-output-escaping="yes">';</xsl:text>
82 </script>
83
84
85 <!-- ********** GSF:SWITCH ********** -->
86
87 <xsl:variable name="switch">
88 <div class="gsf_switch css_gsf_switch block" title="gsf:switch"> SWITCH <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a></div>
89 </xsl:variable>
90
91 <script type="text/javascript">
92 gsf_switch_element = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$switch"/><xsl:text disable-output-escaping="yes">';</xsl:text>
93 </script>
94
95
96 <!-- ********** GSF:WHEN ********** -->
97
98 <xsl:variable name="when">
99 <div class="gsf_when css_gsf_when block" title="gsf:when">WHEN[test=<input type="text" name="rawtextinput" size="10"/>]<a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a></div>
100 </xsl:variable>
101
102 <script type="text/javascript">
103 gsf_when_element = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$when"/><xsl:text disable-output-escaping="yes">';</xsl:text>
104 </script>
105
106 <!-- ********** GSF:OTHERWISE ********** -->
107
108 <xsl:variable name="otherwise">
109 <div class="gsf_otherwise css_gsf_otherwise block" title="gsf:otherwise">OTHERWISE<a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a></div>
110 </xsl:variable>
111
112 <script type="text/javascript">
113 gsf_otherwise_element = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$otherwise"/><xsl:text disable-output-escaping="yes">';</xsl:text>
114 </script>
115
116 <!-- ********** GSF:ICON ********** -->
117
118 <xsl:variable name="icon">
119 <div class="gsf_icon css_gsf_icon block leaf" title="gsf:icon"> ICON[type=<select><option value = "document" selected = "document">Document</option><option value = "classifier">Classifier</option><option value = "source">Source</option></select>]<a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a></div>
120 </xsl:variable>
121
122 <script type="text/javascript">
123 gsf_icon_element = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$icon"/><xsl:text disable-output-escaping="yes">';</xsl:text>
124 </script>
125 </xsl:template>
126
127</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.