Men neme code:
Werkt prima.
Men zetten het om naar XML/XSLT
En men concludeert dat het script NIET meer werkt en men weet niet waar het aan ligt, waarom doet de CDATA zijn WERK niet!
Stylesheet zijn handig, niet echt nodig maar dit is de CSS:
en de XML
Oke, Dit wel een HELE lange topic. IS dat hinderlijk voor jullie?
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
| <html>
<head>
<title>Schaakweb</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<script type="text/javascript">
var time = 3000;
var numofitems = 2;
function menu(allitems,thisitem,startstate){
callname= "gl"+thisitem;
divname="subglobal"+thisitem;
this.numberofmenuitems = 2;
this.caller = document.getElementById(callname);
this.thediv = document.getElementById(divname);
this.thediv.style.visibility = startstate;
}
function ehandler(event,theobj){
for (var i=1; i<= theobj.numberofmenuitems; i++){
var shutdiv =eval( "menuitem"+i+".thediv");
shutdiv.style.visibility="hidden";
}
theobj.thediv.style.visibility="visible";
}
function closesubnav(event){
if ((event.clientY <48)||(event.clientY > 107)){
for (var i=1; i<= numofitems; i++){
var shutdiv =eval('menuitem'+i+'.thediv');
shutdiv.style.visibility='hidden';
}
}
}
</script>
</head>
<body onmousemove="closesubnav(event);">
<div id="masthead">
<h1 id="siteName"><strong>Schaakweb.nl</strong></h1>
<div id="utility">
<a href="#">Uitloggen</a>
</div>
<div id="globalNav">
[img]"gblnav_left.gif"[/img] [img]"glbnav_right.gif"[/img]
<div id="globalLink">
<div align="justify">
<a href="#" id="gl1" class="glink" onmouseover="ehandler(event,menuitem1);">#USER_NAME#</a>
<a href="#" id="gl2" class="glink" onmouseover="ehandler(event,menuitem2);">#USER_CLUB#</a>
</div>
</div>
</div>
<div id="subglobal1" class="subglobalNav">
<a href="../gebruikersinfo.htm" target="mainFrame">Gebruikersinfo</a> | <a href="../wedstrijden.htm" target="mainFrame">Wedstrijden</a> | <a href="../uitdagingen.htm" target="mainFrame">Uitdagingen</a>
</div>
<div id="subglobal2" class="subglobalNav">
<a href="../clubinfo.htm" target="mainFrame">Clubinfo</a> | <a href="../leden.htm" target="mainFrame">Leden</a>
</div>
</div>
<script type="text/javascript">
var menuitem1 = new menu(7,1,"hidden");
var menuitem2 = new menu(7,2,"hidden");
var menuitem3 = new menu(7,3,"hidden");
var menuitem4 = new menu(7,4,"hidden");
var menuitem5 = new menu(7,5,"hidden");
var menuitem6 = new menu(7,6,"hidden");
var menuitem7 = new menu(7,7,"hidden");
</script>
</body>
</html> |
Werkt prima.
Men zetten het om naar XML/XSLT
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
| <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<title>Schaakweb</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
<script type="text/javascript">
<![CDATA[
var time = 3000;
var numofitems = 2;
function menu(allitems,thisitem,startstate){
callname= "gl"+thisitem;
divname="subglobal"+thisitem;
this.numberofmenuitems = 2;
this.caller = document.getElementById(callname);
this.thediv = document.getElementById(divname);
this.thediv.style.visibility = startstate;
}
function ehandler(event,theobj){
for (var i=1; i<= theobj.numberofmenuitems; i++){
var shutdiv =eval( "menuitem"+i+".thediv");
shutdiv.style.visibility="hidden";
}
theobj.thediv.style.visibility="visible";
}
function closesubnav(event){
if ((event.clientY <48)||(event.clientY > 107)){
for (var i=1; i<= numofitems; i++){
var shutdiv =eval('menuitem'+i+'.thediv');
shutdiv.style.visibility='hidden';
}
}
}
]]>
</script>
</head>
<body onMousemove="closesubnav(event);">
<div id="masthead">
<h1 id="siteName"><strong>Schaakweb.nl</strong></h1>
<div id="utility">
<a href="#">Uitloggen</a>
</div>
<div id="globalNav">
[img]"gblnav_left.gif"[/img] [img]"glbnav_right.gif"[/img]
<div id="globalLink">
<div align="justify">
<xsl:apply-templates/>
</div>
</div>
</div>
<div id="subglobal1" class="subglobalNav">
<a href="../gebruikersinfo.htm" target="mainFrame">Gebruikersinfo</a> | <a href="../wedstrijden.htm" target="mainFrame">Wedstrijden</a> | <a href="../uitdagingen.htm" target="mainFrame">Uitdagingen</a>
</div>
<div id="subglobal2" class="subglobalNav">
<a href="../clubinfo.htm" target="mainFrame">Clubinfo</a> | <a href="../leden.htm" target="mainFrame">Leden</a>
</div>
</div>
<script type="text/javascript">
<![CDATA[
var menuitem1 = new menu(7,1,"hidden");
var menuitem2 = new menu(7,2,"hidden");
var menuitem3 = new menu(7,3,"hidden");
var menuitem4 = new menu(7,4,"hidden");
var menuitem5 = new menu(7,5,"hidden");
var menuitem6 = new menu(7,6,"hidden");
var menuitem7 = new menu(7,7,"hidden");
]]>
</script>
</body>
</html>
</xsl:template>
<xsl:template match="//users/user">
<a href="#" id="gl1" class="glink" onmouseover="ehandler(event,menuitem1);"><xsl:value-of select="username" /></a>
<a href="#" id="gl2" class="glink" onmouseover="ehandler(event,menuitem2);"><xsl:value-of select="clubname" /></a>
</xsl:template>
</xsl:stylesheet> |
En men concludeert dat het script NIET meer werkt en men weet niet waar het aan ligt, waarom doet de CDATA zijn WERK niet!
Stylesheet zijn handig, niet echt nodig maar dit is de CSS:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
| body{
font-family: Arial,sans-serif;
color: #333333;
line-height: 1.166;
margin: 0px;
padding: 0px;
background: #cccccc url("bg_grad.jpg");
}
a:link, a:visited{
color: #005FA9;
text-decoration: none;
}
a:hover{
text-decoration: underline;
}
h1{
font: bold 120% Arial,sans-serif;
color: #334d55;
margin: 0px;
padding: 0px;
}
h2{
font: bold 114% Arial,sans-serif;
color: #006699;
margin: 0px;
padding: 0px;
}
h3{
font: bold 100% Arial,sans-serif;
color: #334d55;
margin: 0px;
padding: 0px;
}
h4{
font: 100% Arial,sans-serif;
color: #333333;
margin: 0px;
padding: 0px;
}
h5{
font: 100% Arial,sans-serif;
color: #334d55;
margin: 0px;
padding: 0px;
}
ul{
list-style-type: square;
}
ul ul{
list-style-type: disc;
}
ul ul ul{
list-style-type: none;
}
form {
margin: 0;
padding: 0;
}
label{
font: bold 1em Arial,sans-serif;
color: #334d55;
}
input{
font-family: Arial,sans-serif;
}
#pagecell1{
position: absolute;
left: 20px;
right: 5px;
background-color: #ffffff;
height: 545px;
}
#tl {
position: absolute;
top: -1px;
left: -1px;
margin: 0px;
padding: 0px;
z-index: 100;
}
#tr {
position: absolute;
top: -1px;
right: -1px;
margin: 0px;
padding: 0px;
z-index: 100;
}
#masthead{
position: absolute;
top: 0px;
left: 20px;
right: 20px;
}
#pageNav{
position: relative;
left: 20px;
width: 178px;
padding: 0px;
}
#pageNav2{
position: absolute;
left: 20px;
width: 178px;
padding: 0px;
background-color: #F5f7f7;
border-right: 1px solid #cccccc;
border-bottom: 1px solid #cccccc;
font: small Verdana,sans-serif;
}
#content{
padding: 0px 10px 0px 0px;
margin: 0px 0px 0px 178px;
border-left: 1px solid #ccd2d2;
}
#siteName{
margin: 0px;
padding: 16px 0px 8px 0px;
color: #ffffff;
font-weight: normal;
}
#utility{
font: 75% Verdana,sans-serif;
position: absolute;
top: 16px;
right: 0px;
color: #919999;
}
#utility a{
color: #ffffff;
}
#utility a:hover{
text-decoration: underline;
}
#pageName{
padding: 0px 0px 14px 10px;
margin: 0px;
border-bottom: 1px solid #ccd2d2;
}
#pageName h2{
font: bold 175% Arial,sans-serif;
color: #000000;
margin: 0px;
padding: 0px;
}
#pageName img{
position: absolute;
top: 0px;
right: 6px;
padding: 0px;
margin: 0px;
}
#globalNav{
position: relative;
width: 100%;
min-width: 640px;
height: 32px;
color: #cccccc;
padding: 0px;
margin: 0px;
background-image: url("glbnav_background.gif");
}
#globalNav img{
margin-bottom: -4px;
}
#gnl {
position: absolute;
top: 0px;
left: 0px;
}
#gnr {
position: absolute;
top: 0px;
right: 0px;
}
#globalLink{
position: absolute;
top: 6px;
height: 22px;
min-width: 640px;
padding: 0px;
margin: 0px;
left: 10px;
z-index: 100;
}
a.glink, a.glink:visited{
font-size: small;
color: #000000;
font-weight: bold;
margin: 0px;
padding: 2px 5px 4px 5px;
border-right: 1px solid #8FB8BC;
}
a.glink:hover{
background-image: url("glblnav_selected.gif");
text-decoration: none;
}
.skipLinks {display: none;}
.subglobalNav{
position: absolute;
top: 84px;
left: 0px;
min-width: 640px;
height: 20px;
padding: 0px 0px 0px 10px;
visibility: hidden;
color: #ffffff;
}
.subglobalNav a:link, .subglobalNav a:visited {
font-size: 80%;
color: #cccccc;
}
.subglobalNav a:hover{
color: #FFFFFF;
}
.feature{
padding: 0px 0px 10px 10px;
font-size: 80%;
min-height: 200px;
height: 200px;
}
html>body .feature {height: auto;}
.feature h3{
font: bold 175% Arial,sans-serif;
color: #000000;
padding: 30px 0px 5px 0px;
}
.feature img{
float: left;
padding: 0px 10px 0px 0px;
}
.story {
padding: 10px 0px 0px 10px;
font-size: 80%;
}
.story h3{
font: bold 125% Arial,sans-serif;
color: #000000;
}
.story p {
padding: 0px 0px 10px 0px;
}
.story a.capsule{
font: bold 1em Arial,sans-serif;
color: #005FA9;
display: block;
padding-bottom: 5px;
}
.story a.capsule:hover{
text-decoration: underline;
}
td.storyLeft{
padding-right: 12px;
}
#siteInfo{
clear: both;
border-top: 1px solid #cccccc;
font-size: small;
color: #cccccc;
padding: 10px 10px 10px 10px;
margin-top: -1px;
}
#siteInfo img{
padding: 4px 4px 4px 0px;
vertical-align: middle;
}
#sectionLinks{
margin: 0px;
padding: 0px;
}
#sectionLinks h3{
padding: 10px 0px 2px 10px;
border-bottom: 1px solid #cccccc;
}
#sectionLinks a:link, #sectionLinks a:visited {
display: block;
border-top: 1px solid #ffffff;
border-bottom: 1px solid #cccccc;
background-image: url("bg_nav.jpg");
font-weight: bold;
padding: 3px 0px 3px 10px;
color: #21536A;
}
#sectionLinks a:hover{
border-top: 1px solid #cccccc;
background-color: #DDEEFF;
background-image: none;
font-weight: bold;
text-decoration: none;
}
.relatedLinks{
margin: 0px;
padding: 0px 0px 10px 10px;
border-bottom: 1px solid #cccccc;
}
.relatedLinks h3{
padding: 10px 0px 2px 0px;
}
.relatedLinks a{
display: block;
}
#advert{
padding: 10px;
}
#advert img{
display: block;
} |
en de XML
code:
1
2
3
4
5
6
7
8
| <?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="top_frame.xsl"?>
<users>
<user>
<username>zip</username>
<clubname>zap</clubname>
</user>
</users> |
Oke, Dit wel een HELE lange topic. IS dat hinderlijk voor jullie?
mijn naam slaat nergens op, althans niet op mij :P