author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 25 Jan 2016 16:35:43 +0000 | |
changeset 298 | 9696f76605bd |
parent 296 | ea3dbc023c80 |
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 |
DOMImplementation subclass:#XMLSuiteDOM3Implementation |
|
6 |
instanceVariableNames:'' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'XML Suite-DOM3-Implementation' |
|
10 |
! |
|
11 |
||
12 |
||
13 |
!XMLSuiteDOM3Implementation methodsFor:'DOM3 interface'! |
|
14 |
||
15 |
createDocumentNS:ns qualifiedName:qName doctype:doctype |
|
16 |
"Superclass says that I am responsible to implement this method" |
|
17 |
||
18 |
| doc | |
|
19 |
doc := self createDocument. |
|
20 |
||
21 |
(ns isNil and:[qName isNil and:[doctype isNil]]) |
|
22 |
ifFalse:[doc appendChild:(doc createElement:qName ns:ns)]. |
|
23 |
^doc |
|
24 |
||
25 |
"Created: / 11-08-2005 / 16:30:33 / janfrog" |
|
26 |
"Modified: / 28-12-2005 / 16:18:05 / janfrog" |
|
27 |
! |
|
28 |
||
29 |
createDocumentType:name publicId:publicId systemId:systemId |
|
30 |
"Superclass says that I am responsible to implement this method" |
|
31 |
||
32 |
^DocumentType new |
|
33 |
setName: name; |
|
34 |
setPublicId: publicId; |
|
35 |
setSystemId: systemId; |
|
36 |
yourself |
|
37 |
||
38 |
"Created: / 24-12-2005 / 10:41:36 / janfrog" |
|
39 |
! |
|
40 |
||
41 |
getFeature:feature version:version |
|
42 |
||
43 |
self see:'No features implementation yet'. |
|
44 |
^nil |
|
45 |
||
46 |
"Created: / 19-06-2005 / 15:31:46 / janfrog" |
|
47 |
! |
|
48 |
||
49 |
hasFeature:feature version:version |
|
50 |
||
51 |
self featureArray pairsDo:[:f :v| |
|
52 |
((f sameAs: feature) |
|
53 |
and:[version isNil or:[self isVersionLesserOrEquals: version then: v]]) |
|
54 |
ifTrue:[^true]]. |
|
55 |
^false |
|
56 |
||
57 |
"Created: / 19-06-2005 / 15:29:24 / janfrog" |
|
58 |
! ! |
|
59 |
||
60 |
!XMLSuiteDOM3Implementation methodsFor:'accessing'! |
|
61 |
||
62 |
featureArray |
|
63 |
||
64 |
^#(('XML' '3.0') ('Core' '3.0') ('+XML' '3.0') ('+Core' '3.0')) |
|
65 |
||
66 |
"Created: / 19-06-2005 / 15:31:46 / janfrog" |
|
67 |
! |
|
68 |
||
69 |
saxContentHandlerClass |
|
70 |
"Superclass says that I am responsible to implement this method" |
|
71 |
||
72 |
^DOM3Builder |
|
73 |
||
74 |
"Created: / 04-08-2005 / 12:54:26 / janfrog" |
|
75 |
! ! |
|
76 |
||
77 |
!XMLSuiteDOM3Implementation methodsFor:'instance creation'! |
|
78 |
||
79 |
createDocument |
|
80 |
"Superclass says that I am responsible to implement this method" |
|
81 |
||
82 |
^Document new |
|
83 |
||
84 |
"Created: / 11-08-2005 / 16:35:55 / janfrog" |
|
85 |
"Modified: / 11-08-2005 / 22:32:10 / janfrog" |
|
86 |
! |
|
87 |
||
88 |
createDocumentFragment |
|
89 |
"Superclass says that I am responsible to implement this method" |
|
90 |
||
91 |
^DocumentFragment new setParentNode: self createDocument |
|
92 |
||
93 |
"Created: / 10-12-2006 / 20:35:36 / janfrog" |
|
94 |
"Modified: / 12-04-2007 / 12:08:54 / janfrog" |
|
95 |
! ! |
|
96 |
||
97 |
!XMLSuiteDOM3Implementation methodsFor:'utilities'! |
|
98 |
||
99 |
isVersionLesserOrEquals: version1 then: version2 |
|
100 |
||
101 |
^ ((version1 at: 1) asInteger) <= ((version2 at: 1) asInteger). |
|
102 |
! ! |
|
103 |
||
104 |
!XMLSuiteDOM3Implementation class methodsFor:'documentation'! |
|
105 |
||
106 |
version |
|
107 |
^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/XMLv2__XMLSuiteDOM3Implementation.st,v 1.8 2007-04-12 11:40:04 vranyj1 Exp $' |
|
174
76f50ac2e6a0
removed dependency on libutilui ans sunit, testcases are autoloaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
108 |
! |
76f50ac2e6a0
removed dependency on libutilui ans sunit, testcases are autoloaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
109 |
|
76f50ac2e6a0
removed dependency on libutilui ans sunit, testcases are autoloaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
110 |
version_SVN |
76f50ac2e6a0
removed dependency on libutilui ans sunit, testcases are autoloaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
111 |
^ '$Id$' |
0 | 112 |
! ! |