Toon posts:

XSL when statement

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hallo,

ik ben bezig met een stylesheet (die dus meteen werkt in iexplore 5.x vandaar andere namespace), nu is het probleem dat de teststring .[.=0] (in de gui-template) welliswaar werkt, maar volgens mij niet correct is. Als ik de string verander in .=0 dan krijg ik de melding:

Expected 'Eof' Found '='..-->'='<--0

Weet iemand een oplossing? (8>

Thx Wzard

Hieronder de XSL:
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
  <?xml version="1.0" ?> 
- <!-- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  --> 
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
- <xsl:template match="/">
- <html>
- <head>
  <title>XML-tool informatie</title> 
  </head>
- <body>
  <xsl:apply-templates select="XMLtools/XMLtool" /> 
  </body>
  </html>
  </xsl:template>
- <xsl:template match="XMLtools/XMLtool">
- <p>
- <H1>
  <xsl:value-of select="@name" /> 
  </H1>
  </p>
- <table border="1">
- <tr>
  <td>Toegevoegd:</td> 
- <td>
  <xsl:value-of select="adddate" /> 
  </td>
  </tr>
- <tr>
  <td>Gepubliceerd:</td> 
- <td>
  <xsl:value-of select="publishdate" /> 
  </td>
  </tr>
- <tr>
  <td>Functionaliteit:</td> 
- <td>
  <xsl:value-of select="functionality" /> 
  </td>
  </tr>
- <tr>
  <td>Gebruiksvriendelijkheid:</td> 
- <td>
- <img>
- <xsl:attribute name="src">
  images/ 
  <xsl:value-of select="gebvrheid" /> 
  .gif 
  </xsl:attribute>
  </img>
  </td>
  </tr>
- <tr>
  <td>GUI:</td> 
- <td>
  <xsl:apply-templates select="gui" /> 
  </td>
  </tr>
- <tr>
  <td>Content management systeem:</td> 
- <td>
  <xsl:apply-templates select="cmskoppeling" /> 
  </td>
  </tr>
- <tr>
  <td>Kwaliteit documentatie:</td> 
- <td>
- <img>
- <xsl:attribute name="src">
  images/ 
  <xsl:value-of select="documentatie" /> 
  .gif 
  </xsl:attribute>
  </img>
  </td>
  </tr>
- <tr>
  <td>Licentiering:</td> 
- <td>
  <xsl:value-of select="licentiering" /> 
  </td>
  </tr>
- <tr>
  <td>Hyperlink:</td> 
- <td>
- <a>
- <xsl:attribute name="href">
  <xsl:value-of select="wwwlink" /> 
  </xsl:attribute>
  <xsl:attribute name="target">toollink</xsl:attribute> 
  <xsl:value-of select="wwwlink" /> 
  </a>
  </td>
  </tr>
- <tr>
  <td>XSL:</td> 
- <td>
  <xsl:apply-templates select="xsltoevoeging" /> 
  </td>
  </tr>
- <tr>
  <td>Ondersteunde standaarden:</td> 
- <td>
  <xsl:value-of select="standaarden" /> 
  </td>
  </tr>
- <tr>
  <td>Ondersteuning XPath:</td> 
- <td>
  <xsl:apply-templates select="xpath" /> 
  </td>
  </tr>
- <tr>
  <td>Open Source:</td> 
- <td>
  <xsl:apply-templates select="opensource" /> 
  </td>
  </tr>
- <tr>
  <td>Opmerkingen:</td> 
- <td>
  <xsl:value-of select="opmerkingen" /> 
  </td>
  </tr>
- <tr>
  <td>Specificaties:</td> 
- <td>
  <xsl:value-of select="specificaties" /> 
  </td>
  </tr>
- <tr>
  <td>Prijs:</td> 
- <td>
  <xsl:value-of select="prijs" /> 
  </td>
  </tr>
- <tr>
  <td>Publicerende instantie:</td> 
- <td>
  <xsl:value-of select="publisher" /> 
  </td>
  </tr>
- <tr>
  <td>Samenwerking met andere tools:</td> 
- <td>
  <xsl:apply-templates select="samenwerking" /> 
  </td>
  </tr>
- <tr>
  <td>Stabiliteit</td> 
- <td>
- <img>
- <xsl:attribute name="src">
  images/ 
  <xsl:value-of select="stabiliteit" /> 
  .gif 
  </xsl:attribute>
  </img>
  </td>
  </tr>
- <tr>
  <td>Systeemeisen:</td> 
- <td>
  <xsl:value-of select="systeemeisen" /> 
  </td>
  </tr>
- <tr>
  <td>Toolinfo:</td> 
- <td>
  <xsl:value-of select="toolinfo" /> 
  </td>
  </tr>
- <tr>
  <td>Tooltype:</td> 
- <td>
  <xsl:value-of select="tooltype" /> 
  </td>
  </tr>
- <tr>
  <td>Versie:</td> 
- <td>
  <xsl:value-of select="versie" /> 
  </td>
  </tr>
- <tr>
  <td>Gebruikt in grote organisaties:</td> 
- <td>
  <xsl:apply-templates select="enterpriseuse" /> 
  </td>
  </tr>
  </table>
  </xsl:template>
- <xsl:template match="gui">
- <xsl:choose>
  <xsl:when test=".[. = 1]">Beschikbaar</xsl:when> 
  <xsl:when test=".[. = 0]">Niet beschikbaar</xsl:when> 
- <!--  ?????????? 
  --> 
- <xsl:otherwise>
  <xsl:value-of select="." /> 
  </xsl:otherwise>
  </xsl:choose>
  </xsl:template>
  <xsl:template match="cmskoppeling" /> 
  <xsl:template match="xsltoevoeging" /> 
  <xsl:template match="xpath" /> 
  <xsl:template match="opensource" /> 
  <xsl:template match="samenwerking" /> 
  <xsl:template match="validering" /> 
  <xsl:template match="enterpriseuse" /> 
  </xsl:stylesheet>

  • marcusk
  • Registratie: Februari 2001
  • Laatst online: 26-09-2023
[text() = 1] misschien?