/
DocType.purs
211 lines (112 loc) · 6.46 KB
/
DocType.purs
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
module Control.Google.Apps.XmlService.DocType (
detach,
getElementName,
getInternalSubset,
getParentElement,
getPublicId,
getSystemId,
getValue,
setElementName,
setInternalSubset,
setPublicId,
setSystemId,
asCdata,
asComment,
asDocType,
asElement,
asEntityRef,
asProcessingInstruction,
asText,
getType
) where
import Prelude (Unit, unit)
import Effect (Effect)
import Data.Google.Apps.XmlService.Content as XmlServiceContent
import Data.Google.Apps.XmlService.Element as XmlServiceElement
import Data.Google.Apps.XmlService.DocType as XmlServiceDocType
import Data.Google.Apps.XmlService.Cdata as XmlServiceCdata
import Data.Google.Apps.XmlService.Comment as XmlServiceComment
import Data.Google.Apps.XmlService.EntityRef as XmlServiceEntityRef
import Data.Google.Apps.XmlService.ProcessingInstruction as XmlServiceProcessingInstruction
import Data.Google.Apps.XmlService.Text as XmlServiceText
import Data.Google.Apps.XmlService.ContentType as XmlServiceContentType
foreign import detachImpl :: XmlServiceDocType.DocType -> Effect XmlServiceContent.Content
-- | Detaches the node from its parent Element node.
detach :: XmlServiceDocType.DocType -> Effect XmlServiceContent.Content
detach p' = detachImpl p'
foreign import getElementNameImpl :: XmlServiceDocType.DocType -> Effect String
-- | Gets the name of the root Element node specified in the DocType declaration.
getElementName :: XmlServiceDocType.DocType -> Effect String
getElementName p' = getElementNameImpl p'
foreign import getInternalSubsetImpl :: XmlServiceDocType.DocType -> Effect String
-- | Gets the internal subset data for the DocumentType node.
getInternalSubset :: XmlServiceDocType.DocType -> Effect String
getInternalSubset p' = getInternalSubsetImpl p'
foreign import getParentElementImpl :: XmlServiceDocType.DocType -> Effect XmlServiceElement.Element
-- | Gets the node's parent Element node.
getParentElement :: XmlServiceDocType.DocType -> Effect XmlServiceElement.Element
getParentElement p' = getParentElementImpl p'
foreign import getPublicIdImpl :: XmlServiceDocType.DocType -> Effect String
-- | Gets the public ID of the external subset data for the DocumentType node.
getPublicId :: XmlServiceDocType.DocType -> Effect String
getPublicId p' = getPublicIdImpl p'
foreign import getSystemIdImpl :: XmlServiceDocType.DocType -> Effect String
-- | Gets the system ID of the external subset data for the DocumentType node.
getSystemId :: XmlServiceDocType.DocType -> Effect String
getSystemId p' = getSystemIdImpl p'
foreign import getValueImpl :: XmlServiceDocType.DocType -> Effect String
-- | Gets the text value of all nodes that are direct or indirect children of the
-- | node, in the order they appear in the document.
getValue :: XmlServiceDocType.DocType -> Effect String
getValue p' = getValueImpl p'
foreign import setElementNameImpl :: String -> XmlServiceDocType.DocType -> Effect XmlServiceDocType.DocType
-- | Sets the name of the root Element node to specify in the DocType declaration.
setElementName :: String -> XmlServiceDocType.DocType -> Effect XmlServiceDocType.DocType
setElementName name p' = setElementNameImpl name p'
foreign import setInternalSubsetImpl :: String -> XmlServiceDocType.DocType -> Effect XmlServiceDocType.DocType
-- | Sets the internal subset data for the DocumentType node.
setInternalSubset :: String -> XmlServiceDocType.DocType -> Effect XmlServiceDocType.DocType
setInternalSubset dataParam p' = setInternalSubsetImpl dataParam p'
foreign import setPublicIdImpl :: String -> XmlServiceDocType.DocType -> Effect XmlServiceDocType.DocType
-- | Sets the public ID of the external subset data for the DocumentType node.
setPublicId :: String -> XmlServiceDocType.DocType -> Effect XmlServiceDocType.DocType
setPublicId id p' = setPublicIdImpl id p'
foreign import setSystemIdImpl :: String -> XmlServiceDocType.DocType -> Effect XmlServiceDocType.DocType
-- | Sets the system ID of the external subset data for the DocumentType node.
setSystemId :: String -> XmlServiceDocType.DocType -> Effect XmlServiceDocType.DocType
setSystemId id p' = setSystemIdImpl id p'
foreign import asCdataImpl :: XmlServiceDocType.DocType -> Effect XmlServiceCdata.Cdata
-- | Casts the node as a CDATASection node for the purposes of autocomplete.
asCdata :: XmlServiceDocType.DocType -> Effect XmlServiceCdata.Cdata
asCdata p' = asCdataImpl p'
foreign import asCommentImpl :: XmlServiceDocType.DocType -> Effect XmlServiceComment.Comment
-- | Casts the node as a Comment node for the purposes of autocomplete.
asComment :: XmlServiceDocType.DocType -> Effect XmlServiceComment.Comment
asComment p' = asCommentImpl p'
foreign import asDocTypeImpl :: XmlServiceDocType.DocType -> Effect XmlServiceDocType.DocType
-- | Casts the node as a DocumentType node for the purposes of autocomplete.
asDocType :: XmlServiceDocType.DocType -> Effect XmlServiceDocType.DocType
asDocType p' = asDocTypeImpl p'
foreign import asElementImpl :: XmlServiceDocType.DocType -> Effect XmlServiceElement.Element
-- | Casts the node as an Element node for the purposes of autocomplete.
asElement :: XmlServiceDocType.DocType -> Effect XmlServiceElement.Element
asElement p' = asElementImpl p'
foreign import asEntityRefImpl :: XmlServiceDocType.DocType -> Effect XmlServiceEntityRef.EntityRef
-- | Casts the node as a EntityReference node for the purposes of autocomplete.
asEntityRef :: XmlServiceDocType.DocType -> Effect XmlServiceEntityRef.EntityRef
asEntityRef p' = asEntityRefImpl p'
foreign import asProcessingInstructionImpl :: XmlServiceDocType.DocType -> Effect XmlServiceProcessingInstruction.ProcessingInstruction
-- | Casts the node as a ProcessingInstruction node for the purposes of
-- | autocomplete.
asProcessingInstruction :: XmlServiceDocType.DocType -> Effect XmlServiceProcessingInstruction.ProcessingInstruction
asProcessingInstruction p' = asProcessingInstructionImpl p'
foreign import asTextImpl :: XmlServiceDocType.DocType -> Effect XmlServiceText.Text
-- | Casts the node as a Text node for the purposes of autocomplete.
asText :: XmlServiceDocType.DocType -> Effect XmlServiceText.Text
asText p' = asTextImpl p'
foreign import getTypeImpl :: XmlServiceDocType.DocType -> Effect XmlServiceContentType.ContentTypeForeign
-- Some type is not directly accessible in the runtime.
-- TODO: Implement this
-- getType :: XmlServiceDocType.DocType -> Effect XmlServiceContentType.ContentType
getType :: Unit
getType = unit