0
|
1 |
"{ Package: 'stx:goodies/xmlsuite' }"
|
|
2 |
|
|
3 |
"{ NameSpace: XMLv2 }"
|
|
4 |
|
|
5 |
Object subclass:#DOMImplementation
|
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'XML Suite-DOM3-Implementation'
|
|
10 |
!
|
|
11 |
|
|
12 |
DOMImplementation class instanceVariableNames:'defaultInstance'
|
|
13 |
|
|
14 |
"
|
|
15 |
No other class instance variables are inherited by this class.
|
|
16 |
"
|
|
17 |
!
|
|
18 |
|
|
19 |
|
|
20 |
!DOMImplementation class methodsFor:'DOM3 interface'!
|
|
21 |
|
|
22 |
createDocument
|
|
23 |
|
|
24 |
"Just forward to singleton object"
|
|
25 |
|
|
26 |
^self default createDocument
|
|
27 |
|
|
28 |
"Created: / 04-08-2005 / 13:23:47 / janfrog"
|
|
29 |
!
|
|
30 |
|
|
31 |
createDocumentFragment
|
|
32 |
|
|
33 |
"Just forward to singleton object"
|
|
34 |
|
|
35 |
^self default createDocumentFragment
|
|
36 |
|
|
37 |
"Created: / 10-12-2006 / 20:37:30 / janfrog"
|
|
38 |
!
|
|
39 |
|
|
40 |
createDocumentType
|
|
41 |
|
|
42 |
"Just forward to singleton object"
|
|
43 |
|
|
44 |
^self default createDocumentType
|
|
45 |
|
|
46 |
"Created: / 04-08-2005 / 13:23:54 / janfrog"
|
|
47 |
! !
|
|
48 |
|
|
49 |
!DOMImplementation class methodsFor:'accessing'!
|
|
50 |
|
|
51 |
default
|
|
52 |
|
|
53 |
^defaultInstance ifNil:[defaultInstance := self new]
|
|
54 |
|
|
55 |
"Created: / 19-06-2005 / 15:33:20 / janfrog"
|
|
56 |
!
|
|
57 |
|
|
58 |
flushDefault
|
|
59 |
|
|
60 |
^defaultInstance := nil
|
|
61 |
|
|
62 |
"Created: / 19-06-2005 / 15:33:32 / janfrog"
|
|
63 |
! !
|
|
64 |
|
|
65 |
!DOMImplementation methodsFor:'DOM3 interface'!
|
|
66 |
|
|
67 |
createDocumentNS:ns qualifiedName:qName doctype:documentType
|
|
68 |
|
|
69 |
^self subclassResponsibility
|
|
70 |
|
|
71 |
"Created: / 11-08-2005 / 22:32:09 / janfrog"
|
|
72 |
!
|
|
73 |
|
|
74 |
createDocumentType:type publicId:pubID systemId:sysID
|
|
75 |
|
|
76 |
self subclassResponsibility
|
|
77 |
|
|
78 |
"Created: / 24-12-2005 / 10:41:07 / janfrog"
|
|
79 |
!
|
|
80 |
|
|
81 |
getFeature:feature version:version
|
|
82 |
|
|
83 |
^self subclassResponsibility
|
|
84 |
|
|
85 |
"Created: / 19-06-2005 / 15:31:26 / janfrog"
|
|
86 |
!
|
|
87 |
|
|
88 |
hasFeature:feature version:version
|
|
89 |
|
|
90 |
self featureArray pairsDo:[:f :v|
|
|
91 |
((f sameAs: feature)
|
|
92 |
and:[version isNil or:[version = v]])
|
|
93 |
ifTrue:[^true]].
|
|
94 |
^false
|
|
95 |
|
|
96 |
"Created: / 19-06-2005 / 15:29:24 / janfrog"
|
|
97 |
! !
|
|
98 |
|
|
99 |
!DOMImplementation methodsFor:'accessing'!
|
|
100 |
|
|
101 |
featureArray
|
|
102 |
|
|
103 |
^self subclassResponsibility
|
|
104 |
|
|
105 |
"Created: / 19-06-2005 / 15:29:46 / janfrog"
|
|
106 |
!
|
|
107 |
|
|
108 |
saxContentHandler
|
|
109 |
|
|
110 |
^self saxContentHandlerClass new
|
|
111 |
domImplementation: self.
|
|
112 |
|
|
113 |
"Created: / 04-08-2005 / 12:53:26 / janfrog"
|
|
114 |
"Modified: / 07-04-2007 / 14:59:55 / janfrog"
|
|
115 |
!
|
|
116 |
|
|
117 |
saxContentHandlerClass
|
|
118 |
|
|
119 |
"Answers SAX2 ContentHandler class that builds DOM tree"
|
|
120 |
|
|
121 |
^self subclassResponsibility
|
|
122 |
|
|
123 |
"Created: / 04-08-2005 / 12:53:15 / janfrog"
|
|
124 |
! !
|
|
125 |
|
|
126 |
!DOMImplementation methodsFor:'instance creation'!
|
|
127 |
|
|
128 |
createDocument
|
|
129 |
|
|
130 |
^self subclassResponsibility
|
|
131 |
|
|
132 |
"Created: / 11-08-2005 / 22:32:10 / janfrog"
|
|
133 |
!
|
|
134 |
|
|
135 |
createDocumentFragment
|
|
136 |
|
|
137 |
^self subclassResponsibility
|
|
138 |
|
|
139 |
"Created: / 10-12-2006 / 20:35:20 / janfrog"
|
|
140 |
! !
|
|
141 |
|
|
142 |
!DOMImplementation methodsFor:'utilities'!
|
|
143 |
|
|
144 |
hasFeatures:anArray
|
|
145 |
|
|
146 |
anArray do:[:fp|
|
|
147 |
(self featureArray includes:fp) ifFalse:[^false]
|
|
148 |
].
|
|
149 |
^true
|
|
150 |
|
|
151 |
"
|
|
152 |
XMLSuiteDOM3Implementation default hasFeatures:#(('XML' '3.0'))
|
|
153 |
XMLSuiteDOM3Implementation default hasFeatures:#(('+XML' '3.0'))
|
|
154 |
XMLSuiteDOM3Implementation default hasFeatures:#(('XPath' '3.0'))
|
|
155 |
"
|
|
156 |
|
|
157 |
"Created: / 04-08-2005 / 12:25:43 / janfrog"
|
|
158 |
! !
|
|
159 |
|
|
160 |
!DOMImplementation class methodsFor:'documentation'!
|
|
161 |
|
|
162 |
version
|
|
163 |
^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/XMLv2__DOMImplementation.st,v 1.5 2007-04-10 08:33:12 vranyj1 Exp $'
|
|
164 |
! !
|