author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 10 Apr 2008 09:14:47 +0000 | |
changeset 3 | 7909b6680107 |
parent 2 | 06f508a6f55c |
child 174 | 76f50ac2e6a0 |
permissions | -rw-r--r-- |
3
7909b6680107
Loaded into & commited from 5.3.6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
1 |
"{ Package: 'stx:goodies/xmlsuite/core' }" |
0 | 2 |
|
3 |
"{ NameSpace: XMLv2 }" |
|
4 |
||
5 |
Node subclass:#Element |
|
6 |
instanceVariableNames:'nodeName attributes children' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'XML Suite-DOM3' |
|
10 |
! |
|
11 |
||
12 |
||
13 |
!Element class methodsFor:'instance creation'! |
|
14 |
||
15 |
named:nodeName attributes:attrs |
|
16 |
||
17 |
^self new |
|
18 |
setNodeName:nodeName; |
|
19 |
setAttributes:attrs; |
|
20 |
yourself |
|
21 |
||
22 |
"Created: / 04-08-2005 / 13:27:49 / janfrog" |
|
23 |
! ! |
|
24 |
||
25 |
!Element methodsFor:'DOM3 helpers'! |
|
26 |
||
27 |
computeLookupPrefix:arg |
|
28 |
"Superclass says that I am responsible to implement this method" |
|
29 |
||
30 |
self shouldImplement |
|
31 |
||
32 |
"Created: / 18-06-2005 / 21:13:11 / janfrog" |
|
33 |
! |
|
34 |
||
35 |
getElementsByTagName:localName ns:nsUri into:nodeList |
|
36 |
||
37 |
| selectBlock nsUriToSearch | |
|
38 |
nsUriToSearch := nsUri = '*' ifTrue:[nil] ifFalse:[nsUri]. |
|
39 |
selectBlock := nsUriToSearch |
|
40 |
ifNil:[[:e| e localName = localName]] |
|
41 |
ifNotNil:[[:e| e localName = localName and:[e namespaceURI = nsUriToSearch]]]. |
|
42 |
||
43 |
self getElementsByTagName:localName |
|
44 |
ns:nsUri |
|
45 |
into:nodeList |
|
46 |
usingSelectBlock:selectBlock |
|
47 |
||
48 |
"Created: / 24-08-2005 / 12:39:54 / janfrog" |
|
49 |
"Modified: / 23-12-2005 / 15:31:21 / janfrog" |
|
50 |
! |
|
51 |
||
52 |
getElementsByTagName:localName ns:nsUri into:nodeList usingSelectBlock:selectBlock |
|
53 |
||
54 |
||
55 |
(selectBlock value:self) |
|
56 |
ifTrue:[nodeList add:self]. |
|
57 |
||
58 |
self childNodes do: |
|
59 |
[:child|child getElementsByTagName:localName ns:nsUri into:nodeList usingSelectBlock:selectBlock] |
|
60 |
||
61 |
"Created: / 24-08-2005 / 12:45:56 / janfrog" |
|
62 |
"Modified: / 25-11-2005 / 12:17:12 / janfrog" |
|
63 |
! |
|
64 |
||
65 |
namespaceDeclarationAttributes |
|
66 |
||
67 |
^self attributes select:[:attr|attr isNamespaceDeclarationAttribute] |
|
68 |
||
69 |
"Created: / 18-06-2005 / 20:36:22 / janfrog" |
|
70 |
! |
|
71 |
||
72 |
normalizeCDataSections |
|
73 |
||
74 |
(self domConfig getParameter:'cdata-sections') |
|
75 |
ifTrue:[^self]. |
|
76 |
||
77 |
1 to: children size do:[:idx| |
|
78 |
| node | |
|
79 |
node := children at:idx. |
|
80 |
node isCDATASection ifTrue:[ |
|
81 |
children at:idx put:(Text new data:node data) |
|
82 |
] |
|
83 |
] |
|
84 |
||
85 |
"Created: / 28-12-2005 / 16:18:05 / janfrog" |
|
86 |
! |
|
87 |
||
88 |
normalizeComments |
|
89 |
||
90 |
(self domConfig getParameter: 'comments') |
|
91 |
ifFalse:[children := children reject:[:child|child isComment]] |
|
92 |
||
93 |
"Created: / 28-12-2005 / 16:18:05 / janfrog" |
|
94 |
! |
|
95 |
||
96 |
normalizeNamespaces |
|
97 |
||
98 |
"see appendix B.1 in DOM3 Core" |
|
99 |
||
100 |
"Created: / 18-06-2005 / 20:17:22 / janfrog" |
|
101 |
! |
|
102 |
||
103 |
normalizeTextNodes |
|
104 |
||
105 |
| newChildren | |
|
106 |
newChildren := children class new:children size. |
|
107 |
children do:[:child| |
|
108 |
child isText ifTrue:[ |
|
109 |
newChildren isEmpty ifTrue:[ |
|
110 |
newChildren add: child |
|
111 |
] ifFalse:[ |
|
112 |
newChildren last isText ifTrue:[ |
|
113 |
newChildren last appendData: child data |
|
114 |
] ifFalse:[ |
|
115 |
newChildren add:child |
|
116 |
] |
|
117 |
] |
|
118 |
] ifFalse:[ |
|
119 |
newChildren add:child |
|
120 |
] |
|
121 |
]. |
|
122 |
children := newChildren. |
|
123 |
||
124 |
"Created: / 23-12-2005 / 21:01:26 / janfrog" |
|
125 |
! |
|
126 |
||
127 |
postAdoptedBy:aDocument |
|
128 |
||
129 |
super postAdoptedBy:aDocument. |
|
130 |
||
131 |
attributes := attributes reject:[:attr| attr specified not]. |
|
132 |
attributes do:[:attr|aDocument adoptNode:attr]. |
|
133 |
||
134 |
self childNodes do: |
|
135 |
[:child|aDocument recursivelyAdoptNode:child] |
|
136 |
||
137 |
"Created: / 25-12-2005 / 10:15:19 / janfrog" |
|
138 |
! |
|
139 |
||
140 |
postImportBy:aDocument deep:aBoolean |
|
141 |
nodeName := nodeName deepCopy. |
|
142 |
attributes := attributes |
|
143 |
select:[:attr | attr specified ] |
|
144 |
thenCollect:[:attr | (aDocument importNode:attr deep:true) setParentNode:self ]. |
|
145 |
aBoolean ifFalse:[ |
|
146 |
children := OrderedCollection new |
|
147 |
] ifTrue:[ |
|
148 |
children := children |
|
149 |
collect:[:child | (aDocument importNode:child deep:true) setParentNode:self ] |
|
150 |
] |
|
151 |
||
152 |
"Created: / 25-12-2005 / 11:01:36 / janfrog" |
|
153 |
! |
|
154 |
||
155 |
recusivelyAdoptedBy:aDocument |
|
156 |
||
157 |
super recusivelyAdoptedBy:aDocument. |
|
158 |
self specifiedAttributes do:[:attr| |
|
159 |
aDocument adoptNode:attr |
|
160 |
] |
|
161 |
||
162 |
"Created: / 19-06-2005 / 13:50:54 / janfrog" |
|
163 |
! |
|
164 |
||
165 |
specifiedAttributes |
|
166 |
||
167 |
^self attributes select:[:attr|attr specified] |
|
168 |
||
169 |
"Created: / 19-06-2005 / 13:51:20 / janfrog" |
|
170 |
! |
|
171 |
||
172 |
textContentOn: aStream |
|
173 |
"Superclass says that I am responsible to implement this method" |
|
174 |
||
175 |
self textContentOfChildrenOn: aStream |
|
176 |
||
177 |
"Created: / 18-06-2005 / 20:18:17 / janfrog" |
|
178 |
"Modified: / 11-11-2006 / 09:30:59 / janfrog" |
|
179 |
! ! |
|
180 |
||
181 |
!Element methodsFor:'DOM3 interface'! |
|
182 |
||
183 |
attributes |
|
184 |
||
185 |
^attributes |
|
186 |
||
187 |
"Created: / 17-06-2005 / 11:37:03 / janfrog" |
|
188 |
! |
|
189 |
||
190 |
childNodes |
|
191 |
||
192 |
^children |
|
193 |
||
194 |
"Created: / 17-06-2005 / 11:54:17 / janfrog" |
|
195 |
! |
|
196 |
||
197 |
compareDocumentPosition:arg |
|
198 |
"Superclass says that I am responsible to implement this method" |
|
199 |
||
200 |
self shouldImplement |
|
201 |
||
202 |
"Created: / 18-06-2005 / 20:18:17 / janfrog" |
|
203 |
! |
|
204 |
||
205 |
getAttribute:attrName |
|
206 |
||
207 |
^(attributes getValueByLocalName:attrName) |
|
208 |
ifNil:['' "default value as specified in DOM3-Core.pdf, page 86"]. |
|
209 |
||
210 |
"Created: / 16-06-2005 / 13:46:42 / janfrog" |
|
211 |
! |
|
212 |
||
213 |
getAttribute:localName ns:nsUri |
|
214 |
||
215 |
^(attributes getValueByURI:nsUri localName:localName) |
|
216 |
ifNil:[''] |
|
217 |
||
218 |
"Created: / 16-06-2005 / 13:50:42 / janfrog" |
|
219 |
! |
|
220 |
||
221 |
getAttributeNode:attrName |
|
222 |
^ attributes nodeWithLocalName:attrName |
|
223 |
||
224 |
"Created: / 16-06-2005 / 13:48:00 / janfrog" |
|
225 |
"Modified: / 25-11-2005 / 12:26:43 / janfrog" |
|
226 |
! |
|
227 |
||
228 |
getAttributeNode:localName ns:nsUri |
|
229 |
^ attributes nodesWithURI:nsUri localName:localName |
|
230 |
||
231 |
"Created: / 16-06-2005 / 14:12:35 / janfrog" |
|
232 |
"Modified: / 16-06-2005 / 15:53:47 / janfrog" |
|
233 |
! |
|
234 |
||
235 |
getElementsByTagName:localName |
|
236 |
||
237 |
^self getElementsByTagName:localName ns:nil. |
|
238 |
||
239 |
"Created: / 16-06-2005 / 14:14:49 / janfrog" |
|
240 |
"Modified: / 24-08-2005 / 12:40:32 / janfrog" |
|
241 |
! |
|
242 |
||
243 |
getElementsByTagName:localName ns:nsUri |
|
244 |
||
245 |
| nodeList | |
|
246 |
nodeList := NodeList new:16. |
|
247 |
self getElementsByTagName:localName ns:nsUri into:nodeList. |
|
248 |
^nodeList |
|
249 |
||
250 |
"Created: / 16-06-2005 / 14:14:49 / janfrog" |
|
251 |
"Modified: / 24-08-2005 / 12:41:10 / janfrog" |
|
252 |
! |
|
253 |
||
254 |
hasAttribute:localName |
|
255 |
^ (attributes nodesWithLocalName:localName) size > 0 |
|
256 |
||
257 |
"Created: / 16-06-2005 / 13:53:03 / janfrog" |
|
258 |
"Modified: / 16-06-2005 / 15:54:10 / janfrog" |
|
259 |
! |
|
260 |
||
261 |
hasAttribute:localName ns:nsUri |
|
262 |
^ (attributes nodesWithURI:nsUri localName:localName) notNil |
|
263 |
||
264 |
"Created: / 16-06-2005 / 13:53:10 / janfrog" |
|
265 |
"Modified: / 16-06-2005 / 15:53:47 / janfrog" |
|
266 |
! |
|
267 |
||
268 |
isDefaultNamespace:ns |
|
269 |
||
270 |
| defaultNSDeclAttr | |
|
271 |
||
272 |
self prefix isEmptyOrNil ifTrue:[^nodeName ns = ns]. |
|
273 |
||
274 |
(self attributes notEmptyOrNil |
|
275 |
and:[defaultNSDeclAttr := self attributes nodeWithLocalName:'xmlns']) |
|
276 |
ifTrue:[^defaultNSDeclAttr value = ns]. |
|
277 |
||
278 |
self parent notNil ifTrue:[^self parent isDefaultNamespace:ns]. |
|
279 |
||
280 |
^"unknown"false. |
|
281 |
||
282 |
"Created: / 16-06-2005 / 16:37:58 / janfrog" |
|
283 |
"Modified: / 18-06-2005 / 20:25:24 / janfrog" |
|
284 |
! |
|
285 |
||
286 |
localName |
|
287 |
||
288 |
^nodeName localName |
|
289 |
||
290 |
"Modified: / 17-06-2005 / 11:52:46 / janfrog" |
|
291 |
! |
|
292 |
||
293 |
lookupNamespaceURI:prefix |
|
294 |
||
295 |
(self namespaceURI notNil and:[self prefix = prefix]) ifTrue:[ |
|
296 |
^self namespaceURI]. |
|
297 |
||
298 |
(self hasAttributes) ifTrue:[ |
|
299 |
self namespaceDeclarationAttributes do:[:attr| |
|
300 |
((attr prefix = 'xmlns') and:[attr localName = prefix]) |
|
301 |
ifTrue:[^attr value isEmptyOrNil not |
|
302 |
ifTrue:[attr value] |
|
303 |
ifFalse:[nil]] |
|
304 |
ifFalse:[ |
|
305 |
(attr localName = 'xmlns' and:[attr prefix == nil]) |
|
306 |
ifTrue:[^attr value isEmptyOrNil not |
|
307 |
ifTrue:[attr value] |
|
308 |
ifFalse:[nil]]]]]. |
|
309 |
||
310 |
^super lookupNamespaceURI:prefix |
|
311 |
||
312 |
"Created: / 16-06-2005 / 16:37:58 / janfrog" |
|
313 |
"Modified: / 18-06-2005 / 21:24:59 / janfrog" |
|
314 |
! |
|
315 |
||
316 |
namespaceURI |
|
317 |
||
318 |
^nodeName ns |
|
319 |
||
320 |
"Modified: / 17-06-2005 / 11:52:26 / janfrog" |
|
321 |
! |
|
322 |
||
323 |
nodeName |
|
324 |
||
325 |
^self tagName |
|
326 |
||
327 |
"Modified: / 17-06-2005 / 11:26:41 / janfrog" |
|
328 |
! |
|
329 |
||
330 |
nodeType |
|
331 |
||
332 |
^Node ELEMENT_NODE |
|
333 |
||
334 |
"Created: / 17-06-2005 / 11:43:57 / janfrog" |
|
335 |
! |
|
336 |
||
337 |
normalize |
|
338 |
"Superclass says that I am responsible to implement this method" |
|
339 |
||
340 |
self |
|
341 |
normalizeCDataSections; |
|
342 |
normalizeComments; |
|
343 |
normalizeTextNodes. |
|
344 |
self childNodes do:[:child | |
|
345 |
child normalize |
|
346 |
] |
|
347 |
||
348 |
"Created: / 18-06-2005 / 20:18:16 / janfrog" |
|
349 |
"Modified: / 28-12-2005 / 16:18:05 / janfrog" |
|
350 |
! |
|
351 |
||
352 |
prefix |
|
353 |
||
354 |
^nodeName prefix |
|
355 |
||
356 |
"Created: / 17-06-2005 / 12:10:08 / janfrog" |
|
357 |
"Modified: / 28-06-2005 / 23:34:53 / janfrog" |
|
358 |
! |
|
359 |
||
360 |
prefix:prefix |
|
361 |
||
362 |
^nodeName prefix:prefix |
|
363 |
||
364 |
"Created: / 17-06-2005 / 12:10:18 / janfrog" |
|
365 |
"Modified: / 07-04-2007 / 15:02:23 / janfrog" |
|
366 |
! |
|
367 |
||
368 |
removeAttribute:attrName |
|
369 |
||
370 |
attributes removeNamedItem:attrName. |
|
371 |
||
372 |
"Created: / 16-06-2005 / 13:47:14 / janfrog" |
|
373 |
"Modified: / 16-06-2005 / 16:00:25 / janfrog" |
|
374 |
! |
|
375 |
||
376 |
removeAttribute:localName ns:nsUri |
|
377 |
||
378 |
attributes removeNamedItem:localName ns:nsUri |
|
379 |
||
380 |
"Created: / 16-06-2005 / 13:51:40 / janfrog" |
|
381 |
"Modified: / 16-06-2005 / 16:00:40 / janfrog" |
|
382 |
! |
|
383 |
||
384 |
removeAttributeNode:attr |
|
385 |
||
386 |
attributes remove:attr ifAbsent:[nil] |
|
387 |
||
388 |
"Created: / 16-06-2005 / 13:48:58 / janfrog" |
|
389 |
"Modified: / 16-06-2005 / 16:12:09 / janfrog" |
|
390 |
! |
|
391 |
||
392 |
schemaTypeInfo |
|
393 |
||
394 |
TypeInfo new |
|
395 |
||
396 |
"Created: / 16-06-2005 / 13:53:20 / janfrog" |
|
397 |
"Modified: / 24-12-2005 / 11:11:53 / janfrog" |
|
398 |
! |
|
399 |
||
400 |
setAttribute:qualifiedName ns:ns value:value |
|
401 |
||
402 |
| oldNode | |
|
403 |
||
404 |
(oldNode := attributes getQualifiedNamedItem:qualifiedName) |
|
405 |
ifNotNil:[oldNode value:value] |
|
406 |
ifNil:[ |
|
407 |
attributes add: |
|
408 |
(Attr new |
|
409 |
qualifiedName:qualifiedName; |
|
410 |
ns:ns; |
|
411 |
value:value; |
|
412 |
parent:self) |
|
413 |
] |
|
414 |
||
415 |
"Created: / 16-06-2005 / 13:47:00 / janfrog" |
|
416 |
"Modified: / 31-08-2005 / 14:24:53 / masca" |
|
417 |
"Modified: / 25-10-2005 / 17:08:04 / janfrog" |
|
418 |
! |
|
419 |
||
420 |
setAttribute:localName value:value |
|
421 |
||
422 |
| oldNode | |
|
423 |
(oldNode := attributes getNamedItem:localName) |
|
424 |
ifNotNil:[oldNode value:value] |
|
425 |
ifNil:[ |
|
426 |
attributes add: |
|
427 |
(Attr new |
|
428 |
localName:localName; |
|
429 |
value:value; |
|
430 |
parent:self) |
|
431 |
] |
|
432 |
||
433 |
"Created: / 16-06-2005 / 13:47:00 / janfrog" |
|
434 |
"Modified: / 18-06-2005 / 20:29:00 / janfrog" |
|
435 |
! |
|
436 |
||
437 |
setAttributeNode:attr |
|
438 |
||
439 |
| oldAttr | |
|
440 |
(oldAttr := attributes getNamedItem:attr localName ns:attr namespaceURI) |
|
441 |
ifNotNil:[attributes remove:oldAttr]. |
|
442 |
attributes add:attr. |
|
443 |
attr parent:self. |
|
444 |
||
445 |
"Created: / 16-06-2005 / 13:48:43 / janfrog" |
|
446 |
"Modified: / 23-12-2005 / 15:28:28 / janfrog" |
|
447 |
! |
|
448 |
||
449 |
setAttributeNodeNS:attr |
|
450 |
||
451 |
self setAttributeNode:attr |
|
452 |
||
453 |
"Created: / 16-06-2005 / 13:52:12 / janfrog" |
|
454 |
"Modified: / 16-06-2005 / 16:36:14 / janfrog" |
|
455 |
! |
|
456 |
||
457 |
setIdAttribute:localName isId:isId |
|
458 |
||
459 |
self setIdAttribute:localName ns:nil isId:isId |
|
460 |
||
461 |
"Created: / 16-06-2005 / 13:53:47 / janfrog" |
|
462 |
"Modified: / 23-12-2005 / 15:22:08 / janfrog" |
|
463 |
! |
|
464 |
||
465 |
setIdAttribute:localName ns: nsUri isId:isId |
|
466 |
||
467 |
| attr | |
|
468 |
attr := Attr new |
|
469 |
localName: localName; |
|
470 |
ns: nsUri. |
|
471 |
attr value: (self identityHash printString , '.' , attr identityHash printString). |
|
472 |
self setIdAttributeNode:attr isId: isId |
|
473 |
||
474 |
"Created: / 16-06-2005 / 13:53:47 / janfrog" |
|
475 |
"Modified: / 31-08-2005 / 12:14:28 / masca" |
|
476 |
"Modified: / 23-12-2005 / 15:21:49 / janfrog" |
|
477 |
! |
|
478 |
||
479 |
setIdAttributeNode:attr isId:isId |
|
480 |
||
481 |
attr isId: isId. |
|
482 |
self setAttributeNode: attr |
|
483 |
||
484 |
"Created: / 16-06-2005 / 13:54:00 / janfrog" |
|
485 |
"Modified: / 25-11-2005 / 12:43:29 / janfrog" |
|
486 |
! |
|
487 |
||
488 |
tagName |
|
489 |
||
490 |
^nodeName qualifiedName |
|
491 |
||
492 |
"Created: / 16-06-2005 / 13:46:19 / janfrog" |
|
493 |
! ! |
|
494 |
||
495 |
!Element methodsFor:'DOM3 interface - extensions'! |
|
496 |
||
497 |
getAttribute:localName ns:nsUri ifAbsent: aBlock |
|
498 |
||
499 |
^(attributes getValueByURI:nsUri localName:localName) |
|
500 |
ifNil:aBlock |
|
501 |
||
502 |
"Created: / 07-04-2007 / 10:46:01 / janfrog" |
|
503 |
! ! |
|
504 |
||
505 |
!Element methodsFor:'accessing'! |
|
506 |
||
507 |
localName:localName |
|
508 |
||
509 |
nodeName localName:localName |
|
510 |
||
511 |
"Created: / 07-04-2007 / 10:12:49 / janfrog" |
|
512 |
! |
|
513 |
||
514 |
ns:ns |
|
515 |
||
516 |
nodeName ns:ns |
|
517 |
||
518 |
"Created: / 11-08-2005 / 22:32:16 / janfrog" |
|
519 |
! |
|
520 |
||
521 |
prefic:prefix |
|
522 |
||
523 |
nodeName prefix:prefix |
|
524 |
||
525 |
"Created: / 07-04-2007 / 14:49:30 / janfrog" |
|
526 |
! |
|
527 |
||
528 |
qualifiedName:qualifiedName |
|
529 |
||
530 |
nodeName qualifiedName:qualifiedName |
|
531 |
||
532 |
"Created: / 28-06-2005 / 23:18:06 / janfrog" |
|
533 |
! |
|
534 |
||
535 |
setAttributes:attrs |
|
536 |
||
537 |
attributes := attrs. |
|
538 |
attributes setOwnerElement: self. |
|
539 |
||
540 |
"Created: / 04-08-2005 / 13:26:57 / janfrog" |
|
541 |
"Modified: / 12-11-2007 / 18:39:20 / janfrog" |
|
542 |
! |
|
543 |
||
544 |
setNodeName:aNodeName |
|
545 |
nodeName := aNodeName |
|
546 |
||
547 |
"Created: / 04-08-2005 / 13:27:05 / janfrog" |
|
548 |
! ! |
|
549 |
||
550 |
!Element methodsFor:'children'! |
|
551 |
||
552 |
insertChild:childNode after:refNode |
|
553 |
self childNodes insert:childNode after:refNode. |
|
554 |
self onInsertChild: childNode after: refNode. |
|
555 |
||
556 |
"Created: / 21-11-2007 / 12:04:29 / janfrog" |
|
557 |
! |
|
558 |
||
559 |
insertChild:childNode before:refNode |
|
560 |
self childNodes insert:childNode before:refNode. |
|
561 |
self onInsertChild: childNode before: refNode. |
|
562 |
||
563 |
"Created: / 18-06-2005 / 19:32:55 / janfrog" |
|
564 |
"Modified: / 07-04-2007 / 11:11:09 / janfrog" |
|
565 |
! ! |
|
566 |
||
567 |
!Element methodsFor:'children hooks'! |
|
568 |
||
569 |
onInsertChild: childNode after: refNode |
|
570 |
||
571 |
"Created: / 21-11-2007 / 12:04:35 / janfrog" |
|
572 |
! |
|
573 |
||
574 |
onInsertChild: childNode before: refNode |
|
575 |
||
576 |
"Created: / 07-04-2007 / 11:11:32 / janfrog" |
|
577 |
! ! |
|
578 |
||
579 |
!Element methodsFor:'initialization & release'! |
|
580 |
||
581 |
initialize |
|
582 |
||
583 |
super initialize. |
|
584 |
nodeName := NodeName new. |
|
585 |
attributes := Attributes new setOwnerElement: self. |
|
586 |
children := NamedNodeMap new. |
|
587 |
||
588 |
"Created: / 16-06-2005 / 16:24:01 / janfrog" |
|
589 |
"Modified: / 12-11-2007 / 18:39:33 / janfrog" |
|
590 |
! ! |
|
591 |
||
592 |
!Element methodsFor:'testing'! |
|
593 |
||
594 |
isElement |
|
595 |
^ true |
|
596 |
||
597 |
"Created: / 05-08-2005 / 14:27:51 / janfrog" |
|
598 |
! ! |
|
599 |
||
600 |
!Element methodsFor:'visiting'! |
|
601 |
||
602 |
acceptVisitor:aVisitor |
|
603 |
"Double dispatch back to the visitor, passing my type encoded in |
|
604 |
the selector (visitor pattern)" |
|
605 |
||
606 |
"stub code automatically generated - please change if required" |
|
607 |
||
608 |
^ aVisitor visitElement:self |
|
609 |
||
610 |
"Created: / 05-08-2005 / 13:09:35 / janfrog" |
|
611 |
! ! |
|
612 |
||
613 |
!Element class methodsFor:'documentation'! |
|
614 |
||
615 |
version |
|
616 |
^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/XMLv2__Element.st,v 1.8 2007-11-22 21:42:03 vranyj1 Exp $' |
|
617 |
! ! |