origami 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. data/COPYING.LESSER +165 -0
  2. data/README +77 -0
  3. data/VERSION +1 -0
  4. data/bin/config/pdfcop.conf.yml +237 -0
  5. data/bin/gui/about.rb +46 -0
  6. data/bin/gui/config.rb +132 -0
  7. data/bin/gui/file.rb +385 -0
  8. data/bin/gui/hexdump.rb +74 -0
  9. data/bin/gui/hexview.rb +91 -0
  10. data/bin/gui/imgview.rb +72 -0
  11. data/bin/gui/menu.rb +392 -0
  12. data/bin/gui/properties.rb +132 -0
  13. data/bin/gui/signing.rb +635 -0
  14. data/bin/gui/textview.rb +107 -0
  15. data/bin/gui/treeview.rb +409 -0
  16. data/bin/gui/walker.rb +282 -0
  17. data/bin/gui/xrefs.rb +79 -0
  18. data/bin/pdf2graph +121 -0
  19. data/bin/pdf2ruby +353 -0
  20. data/bin/pdfcocoon +104 -0
  21. data/bin/pdfcop +455 -0
  22. data/bin/pdfdecompress +104 -0
  23. data/bin/pdfdecrypt +95 -0
  24. data/bin/pdfencrypt +112 -0
  25. data/bin/pdfextract +221 -0
  26. data/bin/pdfmetadata +123 -0
  27. data/bin/pdfsh +13 -0
  28. data/bin/pdfwalker +7 -0
  29. data/bin/shell/.irbrc +104 -0
  30. data/bin/shell/console.rb +136 -0
  31. data/bin/shell/hexdump.rb +83 -0
  32. data/origami.rb +36 -0
  33. data/origami/3d.rb +239 -0
  34. data/origami/acroform.rb +321 -0
  35. data/origami/actions.rb +299 -0
  36. data/origami/adobe/fdf.rb +259 -0
  37. data/origami/adobe/ppklite.rb +489 -0
  38. data/origami/annotations.rb +775 -0
  39. data/origami/array.rb +187 -0
  40. data/origami/boolean.rb +101 -0
  41. data/origami/catalog.rb +486 -0
  42. data/origami/destinations.rb +213 -0
  43. data/origami/dictionary.rb +188 -0
  44. data/origami/docmdp.rb +96 -0
  45. data/origami/encryption.rb +1293 -0
  46. data/origami/export.rb +283 -0
  47. data/origami/file.rb +222 -0
  48. data/origami/filters.rb +250 -0
  49. data/origami/filters/ascii.rb +189 -0
  50. data/origami/filters/ccitt.rb +515 -0
  51. data/origami/filters/crypt.rb +47 -0
  52. data/origami/filters/dct.rb +61 -0
  53. data/origami/filters/flate.rb +112 -0
  54. data/origami/filters/jbig2.rb +63 -0
  55. data/origami/filters/jpx.rb +53 -0
  56. data/origami/filters/lzw.rb +195 -0
  57. data/origami/filters/predictors.rb +276 -0
  58. data/origami/filters/runlength.rb +117 -0
  59. data/origami/font.rb +209 -0
  60. data/origami/functions.rb +93 -0
  61. data/origami/graphics.rb +33 -0
  62. data/origami/graphics/colors.rb +191 -0
  63. data/origami/graphics/instruction.rb +126 -0
  64. data/origami/graphics/path.rb +154 -0
  65. data/origami/graphics/patterns.rb +180 -0
  66. data/origami/graphics/state.rb +164 -0
  67. data/origami/graphics/text.rb +224 -0
  68. data/origami/graphics/xobject.rb +493 -0
  69. data/origami/header.rb +90 -0
  70. data/origami/linearization.rb +318 -0
  71. data/origami/metadata.rb +114 -0
  72. data/origami/name.rb +170 -0
  73. data/origami/null.rb +75 -0
  74. data/origami/numeric.rb +188 -0
  75. data/origami/obfuscation.rb +233 -0
  76. data/origami/object.rb +527 -0
  77. data/origami/outline.rb +59 -0
  78. data/origami/page.rb +559 -0
  79. data/origami/parser.rb +268 -0
  80. data/origami/parsers/fdf.rb +45 -0
  81. data/origami/parsers/pdf.rb +27 -0
  82. data/origami/parsers/pdf/linear.rb +113 -0
  83. data/origami/parsers/ppklite.rb +86 -0
  84. data/origami/pdf.rb +1144 -0
  85. data/origami/reference.rb +113 -0
  86. data/origami/signature.rb +474 -0
  87. data/origami/stream.rb +575 -0
  88. data/origami/string.rb +416 -0
  89. data/origami/trailer.rb +173 -0
  90. data/origami/webcapture.rb +87 -0
  91. data/origami/xfa.rb +3027 -0
  92. data/origami/xreftable.rb +447 -0
  93. data/templates/patterns.rb +66 -0
  94. data/templates/widgets.rb +173 -0
  95. data/templates/xdp.rb +92 -0
  96. data/tests/dataset/test.dummycrt +28 -0
  97. data/tests/dataset/test.dummykey +27 -0
  98. data/tests/tc_actions.rb +32 -0
  99. data/tests/tc_annotations.rb +85 -0
  100. data/tests/tc_pages.rb +37 -0
  101. data/tests/tc_pdfattach.rb +24 -0
  102. data/tests/tc_pdfencrypt.rb +110 -0
  103. data/tests/tc_pdfnew.rb +32 -0
  104. data/tests/tc_pdfparse.rb +98 -0
  105. data/tests/tc_pdfsig.rb +37 -0
  106. data/tests/tc_streams.rb +129 -0
  107. data/tests/ts_pdf.rb +45 -0
  108. metadata +193 -0
@@ -0,0 +1,87 @@
1
+ =begin
2
+
3
+ = File
4
+ webcapture.rb
5
+
6
+ = Info
7
+ Origami is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU Lesser General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ Origami is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General Public License
18
+ along with Origami. If not, see <http://www.gnu.org/licenses/>.
19
+
20
+ =end
21
+
22
+ module Origami
23
+
24
+ module Webcapture
25
+
26
+ class SpiderInfo < Dictionary
27
+
28
+ include StandardObject
29
+
30
+ field :V, :Type => Real, :Default => 1.0, :Version => "1.3", :Required => true
31
+ field :C, :Type => Array
32
+
33
+ end
34
+
35
+ class Command < Dictionary
36
+
37
+ module Flags
38
+ SAMESITE = 1 << 1
39
+ SAMEPATH = 1 << 2
40
+ SUBMIT = 1 << 3
41
+ end
42
+
43
+ include StandardObject
44
+
45
+ field :URL, :Type => String, :Required => true
46
+ field :L, :Type => Integer, :Default => 1
47
+ field :F, :Type => Integer, :Default => 0
48
+ field :P, :Type => [ String, Stream ]
49
+ field :CT, :Type => String, :Default => "application/x-www-form-urlencoded"
50
+ field :H, :Type => String
51
+ field :S, :Type => Dictionary
52
+
53
+ end
54
+
55
+ class CommandSettings < Dictionary
56
+
57
+ include StandardObject
58
+
59
+ field :G, :Type => Dictionary
60
+ field :C, :Type => Dictionary
61
+
62
+ end
63
+
64
+ class SourceInformation < Dictionary
65
+
66
+ include StandardObject
67
+
68
+ module SubmissionType
69
+ NOFORM = 0
70
+ GETFORM = 1
71
+ POSTFORM = 2
72
+ end
73
+
74
+ field :AU, :Type => [ String, Dictionary ], :Required => true
75
+ field :TS, :Type => String
76
+ field :E, :Type => String
77
+ field :S, :Type => Integer, :Default => 0
78
+ field :C, :Type => Dictionary
79
+
80
+ end
81
+
82
+ end
83
+
84
+ end
85
+
86
+
87
+
@@ -0,0 +1,3027 @@
1
+ =begin
2
+
3
+ = File
4
+ xfa.rb
5
+
6
+ = Info
7
+ This file is part of Origami, PDF manipulation framework for Ruby
8
+ Copyright (C) 2010 Guillaume Delugr� <guillaume@security-labs.org>
9
+ All right reserved.
10
+
11
+ Origami is free software: you can redistribute it and/or modify
12
+ it under the terms of the GNU Lesser General Public License as published by
13
+ the Free Software Foundation, either version 3 of the License, or
14
+ (at your option) any later version.
15
+
16
+ Origami is distributed in the hope that it will be useful,
17
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ GNU Lesser General Public License for more details.
20
+
21
+ You should have received a copy of the GNU Lesser General Public License
22
+ along with Origami. If not, see <http://www.gnu.org/licenses/>.
23
+
24
+ =end
25
+
26
+ require 'rexml/document'
27
+
28
+ module Origami
29
+
30
+ class PDF
31
+
32
+ def create_xfa_form(xdp, *fields)
33
+ acroform = create_acroform(*fields)
34
+ acroform.XFA = Stream.new(xdp, :Filter => :FlateDecode)
35
+
36
+ acroform
37
+ end
38
+
39
+ end
40
+
41
+ module XFA
42
+
43
+ class XFAError < Exception #:nodoc:
44
+ end
45
+
46
+ module ClassMethods
47
+
48
+ def xfa_attribute(name)
49
+
50
+ read_xml_attr = lambda { return self.attributes[name.to_s] }
51
+ write_xml_attr = lambda { |value| self.attributes[name.to_s] = value }
52
+
53
+ send(:define_method, "attr_#{name.to_s}", read_xml_attr)
54
+ send(:define_method, "attr_#{name.to_s}=", write_xml_attr)
55
+
56
+ end
57
+
58
+ def xfa_node(name, type, range = (0..(1.0/0)))
59
+ add_child = lambda { |*attr|
60
+ elt = self.add_element(type.new)
61
+
62
+ unless attr.empty?
63
+ attr.first.each do |k,v|
64
+ elt.attributes[k.to_s] = v
65
+ end
66
+ end
67
+
68
+ return elt
69
+ }
70
+
71
+ send(:define_method, "add_#{name}", add_child)
72
+ end
73
+
74
+ def mime_type(type)
75
+ send(:define_method, "mime_type") { return type }
76
+ end
77
+
78
+ end
79
+
80
+ def self.included(receiver)
81
+ receiver.extend(ClassMethods)
82
+ end
83
+
84
+ class Element < REXML::Element
85
+ include XFA
86
+ end
87
+
88
+ end
89
+
90
+ module XDP
91
+
92
+ module Packet
93
+
94
+ #
95
+ # This packet encloses the configuration settings.
96
+ #
97
+ class Config < XFA::Element
98
+ mime_type 'text/xml'
99
+
100
+ def initialize
101
+ super("config")
102
+
103
+ add_attribute 'xmlns:xfa', 'http://www.xfa.org/schema/xci/3.0/'
104
+ end
105
+
106
+ class URI < XFA::Element
107
+ xfa_attribute 'desc'
108
+ xfa_attribute 'lock'
109
+
110
+ def initialize(uri = "")
111
+ super('uri')
112
+
113
+ self.text = uri
114
+ end
115
+ end
116
+
117
+ class Debug < XFA::Element
118
+ xfa_attribute 'desc'
119
+ xfa_attribute 'lock'
120
+
121
+ xfa_node 'uri', Config::URI, 0..1
122
+
123
+ def initialize
124
+ super('debug')
125
+ end
126
+ end
127
+
128
+ class AdjustData < XFA::Element
129
+ xfa_attribute 'desc'
130
+ xfa_attribute 'lock'
131
+
132
+ def initialize(coercion = "0")
133
+ super('adjustData')
134
+
135
+ self.text = coercion
136
+ end
137
+ end
138
+
139
+ class Attributes < XFA::Element
140
+ xfa_attribute 'desc'
141
+ xfa_attribute 'lock'
142
+
143
+ PRESERVE = "preserve"
144
+ DELEGATE = "delegate"
145
+ IGNORE = "ignore"
146
+
147
+ def initialize(attr = PRESERVE)
148
+ super('attributes')
149
+
150
+ self.text = attr
151
+ end
152
+ end
153
+
154
+ class IncrementalLoad < XFA::Element
155
+ xfa_attribute 'desc'
156
+ xfa_attribute 'lock'
157
+
158
+ NONE = "none"
159
+ FORWARDONLY = "forwardOnly"
160
+
161
+ def initialize(incload = NONE)
162
+ super('incrementalLoad')
163
+
164
+ self.text = incload
165
+ end
166
+ end
167
+
168
+ class Locale < XFA::Element
169
+ xfa_attribute 'desc'
170
+ xfa_attribute 'lock'
171
+
172
+ def initialize(locale = "")
173
+ super('locale')
174
+
175
+ self.text = locale
176
+ end
177
+ end
178
+
179
+ class LocaleSet < XFA::Element
180
+ xfa_attribute 'desc'
181
+ xfa_attribute 'lock'
182
+
183
+ def initialize(uri = "")
184
+ super('localeSet')
185
+
186
+ self.text = uri
187
+ end
188
+ end
189
+
190
+ class OutputXSL < XFA::Element
191
+ xfa_attribute 'desc'
192
+ xfa_attribute 'lock'
193
+
194
+ xfa_node 'uri', Config::URI, 0..1
195
+
196
+ def initialize
197
+ super('outputXSL')
198
+ end
199
+ end
200
+
201
+ class Range < XFA::Element
202
+ xfa_attribute 'desc'
203
+ xfa_attribute 'lock'
204
+
205
+ def initialize(range = "")
206
+ super('range')
207
+
208
+ self.text = range
209
+ end
210
+ end
211
+
212
+ class Record < XFA::Element
213
+ xfa_attribute 'desc'
214
+ xfa_attribute 'lock'
215
+
216
+ def initialize(record = "")
217
+ super('record')
218
+
219
+ self.text = ""
220
+ end
221
+ end
222
+
223
+ class StartNode < XFA::Element
224
+ xfa_attribute 'desc'
225
+ xfa_attribute 'lock'
226
+
227
+ def initialize(somexpr = "")
228
+ super('startNode')
229
+
230
+ self.text = somexpr
231
+ end
232
+ end
233
+
234
+ class Window < XFA::Element
235
+ xfa_attribute 'desc'
236
+ xfa_attribute 'lock'
237
+
238
+ def initialize(win = "0")
239
+ super('window')
240
+
241
+ self.text = win
242
+ end
243
+ end
244
+
245
+ class XSL < XFA::Element
246
+ xfa_attribute 'desc'
247
+ xfa_attribute 'lock'
248
+
249
+ xfa_node 'debug', Config::Debug, 0..1
250
+ xfa_node 'uri', Config::URI, 0..1
251
+
252
+ def initialize
253
+ super('xsl')
254
+ end
255
+ end
256
+
257
+ class ExcludeNS < XFA::Element
258
+ xfa_attribute 'desc'
259
+ xfa_attribute 'lock'
260
+
261
+ def initialize(ns = "")
262
+ super('excludeNS')
263
+
264
+ self.text = ns
265
+ end
266
+ end
267
+
268
+ class GroupParent < XFA::Element
269
+ xfa_attribute 'desc'
270
+ xfa_attribute 'lock'
271
+
272
+ def initialize(parentname = "")
273
+ super('groupParent')
274
+
275
+ self.text = parentname
276
+ end
277
+ end
278
+
279
+ class IfEmpty < XFA::Element
280
+ xfa_attribute 'desc'
281
+ xfa_attribute 'lock'
282
+
283
+ DATAVALUE = "dataValue"
284
+ DATAGROUP = "dataGroup"
285
+ IGNORE = "ignore"
286
+ REMOVE = "remove"
287
+
288
+ def initialize(default = DATAVALUE)
289
+ super('ifEmpty')
290
+
291
+ self.text = default
292
+ end
293
+ end
294
+
295
+ class NameAttr < XFA::Element
296
+ xfa_attribute 'desc'
297
+ xfa_attribute 'lock'
298
+
299
+ def initialize(name)
300
+ super('nameAttr')
301
+
302
+ self.text = name
303
+ end
304
+ end
305
+
306
+ class Picture < XFA::Element
307
+ xfa_attribute 'desc'
308
+ xfa_attribute 'lock'
309
+
310
+ def initialize(clause = "")
311
+ super('picture')
312
+
313
+ self.text = clause
314
+ end
315
+ end
316
+
317
+ class Presence < XFA::Element
318
+ xfa_attribute 'desc'
319
+ xfa_attribute 'lock'
320
+
321
+ PRESERVE = "preserve"
322
+ DISSOLVE = "dissolve"
323
+ DISSOLVESTRUCTURE = "dissolveStructure"
324
+ IGNORE = "ignore"
325
+ REMOVE = "remove"
326
+
327
+ def initialize(action = PRESERVE)
328
+ super('presence')
329
+
330
+ self.text = action
331
+ end
332
+ end
333
+
334
+ class Rename < XFA::Element
335
+ xfa_attribute 'desc'
336
+ xfa_attribute 'lock'
337
+
338
+ def initialize(nodename = "")
339
+ super('rename')
340
+
341
+ self.text = nodename
342
+ end
343
+ end
344
+
345
+ class Whitespace < XFA::Element
346
+ xfa_attribute 'desc'
347
+ xfa_attribute 'lock'
348
+
349
+ PRESERVE = "preserve"
350
+ LTRIM = "ltrim"
351
+ NORMALIZE = "normalize"
352
+ RTRIM = "rtrim"
353
+ TRIM = "trim"
354
+
355
+ def initialize(action = PRESERVE)
356
+ super('whitespace')
357
+
358
+ self.text = action
359
+ end
360
+ end
361
+
362
+ class Transform < XFA::Element
363
+ xfa_attribute 'desc'
364
+ xfa_attribute 'lock'
365
+ xfa_attribute 'ref'
366
+
367
+ xfa_node 'groupParent', Config::GroupParent, 0..1
368
+ xfa_node 'ifEmpty', Config::IfEmpty, 0..1
369
+ xfa_node 'nameAttr', Config::NameAttr, 0..1
370
+ xfa_node 'picture', Config::Picture, 0..1
371
+ xfa_node 'presence', Config::Presence, 0..1
372
+ xfa_node 'rename', Config::Rename, 0..1
373
+ xfa_node 'whitespace', Config::Whitespace, 0..1
374
+ end
375
+
376
+ class Data < XFA::Element
377
+ xfa_attribute 'desc'
378
+ xfa_attribute 'lock'
379
+
380
+ xfa_node 'adjustData', Config::AdjustData, 0..1
381
+ xfa_node 'attributes', Config::Attributes, 0..1
382
+ xfa_node 'incrementalLoad', Config::IncrementalLoad, 0..1
383
+ xfa_node 'outputXSL', Config::OutputXSL, 0..1
384
+ xfa_node 'range', Config::Range, 0..1
385
+ xfa_node 'record', Config::Record, 0..1
386
+ xfa_node 'startNode', Config::StartNode, 0..1
387
+ xfa_node 'uri', Config::URI, 0..1
388
+ xfa_node 'window', Config::Window, 0..1
389
+ xfa_node 'xsl', Config::XSL, 0..1
390
+
391
+ xfa_node 'excludeNS', Config::ExcludeNS
392
+ xfa_node 'transform', Config::Transform
393
+
394
+ def initialize
395
+ super('data')
396
+ end
397
+ end
398
+
399
+ class Severity < XFA::Element
400
+ xfa_attribute 'desc'
401
+ xfa_attribute 'lock'
402
+
403
+ IGNORE = "ignore"
404
+ ERROR = "error"
405
+ INFORMATION = "information"
406
+ TRACE = "trace"
407
+ WARNING = "warning"
408
+
409
+ def initialize(level = IGNORE)
410
+ super('severity')
411
+
412
+ self.text = level
413
+ end
414
+ end
415
+
416
+ class MsgId < XFA::Element
417
+ xfa_attribute 'desc'
418
+ xfa_attribute 'lock'
419
+
420
+ def initialize(uid = "1")
421
+ super('msgId')
422
+
423
+ self.text = uid
424
+ end
425
+ end
426
+
427
+ class Message < XFA::Element
428
+ xfa_attribute 'desc'
429
+ xfa_attribute 'lock'
430
+
431
+ xfa_node 'msgId', Config::MsgId, 0..1
432
+ xfa_node 'severity', Config::Severity, 0..1
433
+
434
+ def initialize
435
+ super('message')
436
+ end
437
+ end
438
+
439
+ class Messaging < XFA::Element
440
+ xfa_attribute 'desc'
441
+ xfa_attribute 'lock'
442
+
443
+ xfa_node 'message', Config::Message
444
+
445
+ def initialize
446
+ super('messaging')
447
+ end
448
+ end
449
+
450
+ class SuppressBanner < XFA::Element
451
+ xfa_attribute 'desc'
452
+ xfa_attribute 'lock'
453
+
454
+ ALLOWED = "0"
455
+ DENIED = "1"
456
+
457
+ def initialize(display = ALLOWED)
458
+ super('suppressBanner')
459
+
460
+ self.text = display
461
+ end
462
+ end
463
+
464
+ class Base < XFA::Element
465
+ xfa_attribute 'desc'
466
+ xfa_attribute 'lock'
467
+
468
+ def initialize(uri = "")
469
+ super('base')
470
+
471
+ self.text = uri
472
+ end
473
+ end
474
+
475
+ class Relevant < XFA::Element
476
+ xfa_attribute 'desc'
477
+ xfa_attribute 'lock'
478
+
479
+ def initialize(token = "")
480
+ super('relevant')
481
+
482
+ self.text = token
483
+ end
484
+ end
485
+
486
+ class StartPage < XFA::Element
487
+ xfa_attribute 'desc'
488
+ xfa_attribute 'lock'
489
+
490
+ def initialize(pagenum = "0")
491
+ super('startPage')
492
+
493
+ self.text = pagenum
494
+ end
495
+ end
496
+
497
+ class Template < XFA::Element
498
+ xfa_attribute 'desc'
499
+ xfa_attribute 'lock'
500
+
501
+ xfa_node 'base', Config::Base, 0..1
502
+ xfa_node 'relevant', Config::Relevant, 0..1
503
+ xfa_node 'startPage', Config::StartPage, 0..1
504
+ xfa_node 'uri', Config::URI, 0..1
505
+ xfa_node 'xsl', Config::XSL, 0..1
506
+
507
+ def initialize
508
+ super('template')
509
+ end
510
+ end
511
+
512
+ class ValidationMessaging < XFA::Element
513
+ xfa_attribute 'desc'
514
+ xfa_attribute 'lock'
515
+
516
+ ALL_INDIVIDUALLY = "allMessagesIndividually"
517
+ ALL_TOGETHER = "allMessagesTogether"
518
+ FIRST_ONLY = "firstMessageOnly"
519
+ NONE = "noMessages"
520
+
521
+ def initialize(validate = ALL_INDIVIDUALLY)
522
+ super('validationMessaging')
523
+
524
+ self.text = validate
525
+ end
526
+ end
527
+
528
+ class VersionControl < XFA::Element
529
+ xfa_attribute 'lock'
530
+ xfa_attribute 'outputBelow'
531
+ xfa_attribute 'sourceAbove'
532
+ xfa_attribute 'sourceBelow'
533
+
534
+ def initialize
535
+ super('versionControl')
536
+ end
537
+ end
538
+
539
+ class Mode < XFA::Element
540
+ xfa_attribute 'desc'
541
+ xfa_attribute 'lock'
542
+
543
+ APPEND = "append"
544
+ OVERWRITE = "overwrite"
545
+
546
+ def initialize(mode = APPEND)
547
+ super('mode')
548
+
549
+ self.text = mode
550
+ end
551
+ end
552
+
553
+ class Threshold < XFA::Element
554
+ xfa_attribute 'desc'
555
+ xfa_attribute 'lock'
556
+
557
+ TRACE = "trace"
558
+ ERROR = "error"
559
+ INFORMATION = "information"
560
+ WARN = "warn"
561
+
562
+ def initialize(threshold = TRACE)
563
+ super('threshold')
564
+
565
+ self.text = threshold
566
+ end
567
+ end
568
+
569
+ class To < XFA::Element
570
+ xfa_attribute 'desc'
571
+ xfa_attribute 'lock'
572
+
573
+ NULL = "null"
574
+ MEMORY = "memory"
575
+ STD_ERR = "stderr"
576
+ STD_OUT = "stdout"
577
+ SYSTEM = "system"
578
+ URI = "uri"
579
+
580
+ def initialize(dest = NULL)
581
+ super('to')
582
+
583
+ self.text = dest
584
+ end
585
+ end
586
+
587
+ class Log < XFA::Element
588
+ xfa_attribute 'desc'
589
+ xfa_attribute 'lock'
590
+
591
+ xfa_node 'mode', Config::Mode, 0..1
592
+ xfa_node 'threshold', Config::Threshold, 0..1
593
+ xfa_node 'to', Config::To, 0..1
594
+ xfa_node 'uri', Config::URI, 0..1
595
+
596
+ def initialize
597
+ super('log')
598
+ end
599
+ end
600
+
601
+ class Common < XFA::Element
602
+ xfa_attribute 'desc'
603
+ xfa_attribute 'lock'
604
+
605
+ xfa_node 'data', Config::Data, 0..1
606
+ xfa_node 'locale', Config::Locale, 0..1
607
+ xfa_node 'localeSet', Config::LocaleSet, 0..1
608
+ xfa_node 'messaging', Config::Messaging, 0..1
609
+ xfa_node 'suppressBanner', Config::SuppressBanner, 0..1
610
+ xfa_node 'template', Config::Template, 0..1
611
+ xfa_node 'validationMessaging', Config::ValidationMessaging, 0..1
612
+ xfa_node 'versionControl', Config::VersionControl, 0..1
613
+
614
+ xfa_node 'log', Config::Log
615
+
616
+ def initialize
617
+ super("common")
618
+ end
619
+ end
620
+
621
+ end
622
+
623
+ #
624
+ # The _connectionSet_ packet describes the connections used to initiate or conduct web services.
625
+ #
626
+ class ConnectionSet < XFA::Element
627
+ mime_type 'text/xml'
628
+
629
+ def initialize
630
+ super("connectionSet")
631
+
632
+ add_attribute 'xmlns', 'http://www.xfa.org/schema/xfa-connection-set/2.8/'
633
+ end
634
+
635
+ class EffectiveInputPolicy < XFA::Element
636
+ xfa_attribute 'id'
637
+ xfa_attribute 'name'
638
+ xfa_attribute 'use'
639
+ xfa_attribute 'usehref'
640
+
641
+ def initialize
642
+ super('effectiveInputPolicy')
643
+ end
644
+ end
645
+
646
+ class EffectiveOutputPolicy < XFA::Element
647
+ xfa_attribute 'id'
648
+ xfa_attribute 'name'
649
+ xfa_attribute 'use'
650
+ xfa_attribute 'usehref'
651
+
652
+ def initialize
653
+ super('effectiveOutputPolicy')
654
+ end
655
+ end
656
+
657
+ class Operation < XFA::Element
658
+ xfa_attribute 'id'
659
+ xfa_attribute 'input'
660
+ xfa_attribute 'name'
661
+ xfa_attribute 'output'
662
+ xfa_attribute 'use'
663
+ xfa_attribute 'usehref'
664
+
665
+ def initialize(name = "")
666
+ super('operation')
667
+
668
+ self.text = name
669
+ end
670
+ end
671
+
672
+ class SOAPAction < XFA::Element
673
+ xfa_attribute 'id'
674
+ xfa_attribute 'name'
675
+ xfa_attribute 'use'
676
+ xfa_attribute 'usehref'
677
+
678
+ def initialize(uri = "")
679
+ super('soapAction')
680
+
681
+ self.text = uri
682
+ end
683
+ end
684
+
685
+ class SOAPAddress < XFA::Element
686
+ xfa_attribute 'id'
687
+ xfa_attribute 'name'
688
+ xfa_attribute 'use'
689
+ xfa_attribute 'usehref'
690
+
691
+ def initialize(addr = "")
692
+ super('soapAddress')
693
+
694
+ self.text = addr
695
+ end
696
+ end
697
+
698
+ class WSDLAddress < XFA::Element
699
+ xfa_attribute 'id'
700
+ xfa_attribute 'name'
701
+ xfa_attribute 'use'
702
+ xfa_attribute 'usehref'
703
+
704
+ def initialize(addr = "")
705
+ super('wsdlAddress')
706
+
707
+ self.text = addr
708
+ end
709
+ end
710
+
711
+ class WSDLConnection < XFA::Element
712
+ xfa_attribute 'dataDescription'
713
+ xfa_attribute 'name'
714
+
715
+ xfa_node 'effectiveInputPolicy', ConnectionSet::EffectiveInputPolicy, 0..1
716
+ xfa_node 'effectiveOutputPolicy', ConnectionSet::EffectiveOutputPolicy, 0..1
717
+ xfa_node 'operation', ConnectionSet::Operation, 0..1
718
+ xfa_node 'soapAction', ConnectionSet::SOAPAction, 0..1
719
+ xfa_node 'soapAddress', ConnectionSet::SOAPAddress, 0..1
720
+ xfa_node 'wsdlAddress', ConnectionSet::WSDLAddress, 0..1
721
+
722
+ def initialize
723
+ super('wsdlConnection')
724
+ end
725
+ end
726
+
727
+ class URI < XFA::Element
728
+ xfa_attribute 'id'
729
+ xfa_attribute 'name'
730
+ xfa_attribute 'use'
731
+ xfa_attribute 'usehref'
732
+
733
+ def initialize(uri = "")
734
+ super('uri')
735
+
736
+ self.text = uri
737
+ end
738
+ end
739
+
740
+ class RootElement < XFA::Element
741
+ xfa_attribute 'id'
742
+ xfa_attribute 'name'
743
+ xfa_attribute 'use'
744
+ xfa_attribute 'usehref'
745
+
746
+ def initialize(root = '')
747
+ super('rootElement')
748
+
749
+ self.text = root
750
+ end
751
+ end
752
+
753
+ class XSDConnection < XFA::Element
754
+ xfa_attribute 'dataDescription'
755
+ xfa_attribute 'name'
756
+
757
+ xfa_node 'rootElement', ConnectionSet::RootElement, 0..1
758
+ xfa_node 'uri', ConnectionSet::URI, 0..1
759
+
760
+ def initialize
761
+ super('xsdConnection')
762
+ end
763
+ end
764
+
765
+ class XMLConnection < XFA::Element
766
+ xfa_attribute 'dataDescription'
767
+ xfa_attribute 'name'
768
+
769
+ xfa_node 'uri', ConnectionSet::URI, 0..1
770
+
771
+ def initialize
772
+ super('xmlConnection')
773
+ end
774
+ end
775
+
776
+ xfa_node 'wsdlConnection', ConnectionSet::WSDLConnection
777
+ xfa_node 'xmlConnection', ConnectionSet::XMLConnection
778
+ xfa_node 'xsdConnection', ConnectionSet::XSDConnection
779
+
780
+ end
781
+
782
+ #
783
+ # The _datasets_ element enclosed XML data content that may have originated from an XFA form and/or
784
+ # may be intended to be consumed by an XFA form.
785
+ #
786
+ class Datasets < XFA::Element
787
+ mime_type 'text/xml'
788
+
789
+ class Data < XFA::Element
790
+ def initialize
791
+ super('xfa:data')
792
+ end
793
+ end
794
+
795
+ def initialize
796
+ super("xfa:datasets")
797
+
798
+ add_attribute 'xmlns:xfa', 'http://www.xfa.org/schema/xfa-data/1.0/'
799
+ end
800
+ end
801
+
802
+ #
803
+ # The _localeSet_ packet encloses information about locales.
804
+ #
805
+ class LocaleSet < XFA::Element
806
+ mime_type 'text/xml'
807
+
808
+ def initialize
809
+ super("localeSet")
810
+
811
+ add_attribute 'xmlns', 'http://www.xfa.org/schema/xfa-locale-set/2.7/'
812
+ end
813
+ end
814
+
815
+ #
816
+ # An XDF _pdf_ element encloses a PDF packet.
817
+ #
818
+ class PDF < XFA::Element
819
+ mime_type 'application/pdf'
820
+ xfa_attribute :href
821
+
822
+ def initialize
823
+ super("pdf")
824
+
825
+ add_attribute 'xmlns', 'http://ns.adobe.com/xdp/pdf/'
826
+ end
827
+
828
+ def enclose_pdf(pdfdata)
829
+ require 'base64'
830
+ b64data = Base64.encode64(pdfdata).chomp!
831
+
832
+ doc = elements['document'] || add_element('document')
833
+ chunk = doc.elements['chunk'] || doc.add_element('chunk')
834
+
835
+ chunk.text = b64data
836
+
837
+ self
838
+ end
839
+
840
+ def has_enclosed_pdf?
841
+ chunk = elements['document/chunk']
842
+
843
+ not chunk.nil? and not chunk.text.nil?
844
+ end
845
+
846
+ def remove_enclosed_pdf
847
+ elements.delete('document') if has_enclosed_pdf?
848
+ end
849
+
850
+ def enclosed_pdf
851
+ return nil unless has_enclosed_pdf?
852
+
853
+ require 'base64'
854
+ Base64.decode64(elements['document/chunk'].text)
855
+ end
856
+
857
+ end
858
+
859
+ #
860
+ # The _signature_ packet encloses a detached digital signature.
861
+ #
862
+ class Signature < XFA::Element
863
+ mime_type ''
864
+
865
+ def initialize
866
+ super("signature")
867
+
868
+ add_attribute 'xmlns', 'http://www.w3.org/2000/09/xmldsig#'
869
+ end
870
+ end
871
+
872
+ #
873
+ # The _sourceSet_ packet contains ADO database queries, used to describe data
874
+ # binding to ADO data sources.
875
+ #
876
+ class SourceSet < XFA::Element
877
+ mime_type 'text/xml'
878
+
879
+ def initialize
880
+ super("sourceSet")
881
+
882
+ add_attribute 'xmlns', 'http://www.xfa.org/schema/xfa-source-set/2.8/'
883
+ end
884
+ end
885
+
886
+ #
887
+ # The _stylesheet_ packet encloses a single XSLT stylesheet.
888
+ #
889
+ class StyleSheet < XFA::Element
890
+ mime_type 'text/css'
891
+
892
+ def initialize(id)
893
+ super("xsl:stylesheet")
894
+
895
+ add_attribute 'version', '1.0'
896
+ add_attribute 'xmlns:xsl', 'http://www.w3.org/1999/XSL/Transform'
897
+ add_attribute 'id', id.to_s
898
+ end
899
+ end
900
+
901
+ #
902
+ # This packet contains the form template.
903
+ #
904
+ class Template < XFA::Element
905
+ mime_type 'application/x-xfa-template'
906
+
907
+ class Boolean < XFA::Element
908
+ xfa_attribute 'id'
909
+ xfa_attribute 'name'
910
+ xfa_attribute 'use'
911
+ xfa_attribute 'usehref'
912
+
913
+ NO = 0
914
+ YES = 1
915
+
916
+ def initialize(bool = nil)
917
+ super('boolean')
918
+
919
+ self.text = bool
920
+ end
921
+ end
922
+
923
+ class Date < XFA::Element
924
+ xfa_attribute 'id'
925
+ xfa_attribute 'name'
926
+ xfa_attribute 'use'
927
+ xfa_attribute 'usehref'
928
+
929
+ def initialize(date = nil)
930
+ super('date')
931
+
932
+ self.text = date
933
+ end
934
+ end
935
+
936
+ class DateTime < XFA::Element
937
+ xfa_attribute 'id'
938
+ xfa_attribute 'name'
939
+ xfa_attribute 'use'
940
+ xfa_attribute 'usehref'
941
+
942
+ def initialize(datetime = nil)
943
+ super('dateTime')
944
+
945
+ self.text = datetime
946
+ end
947
+ end
948
+
949
+ class Decimal < XFA::Element
950
+ xfa_attribute 'fracDigits'
951
+ xfa_attribute 'id'
952
+ xfa_attribute 'leadDigits'
953
+ xfa_attribute 'name'
954
+ xfa_attribute 'use'
955
+ xfa_attribute 'usehref'
956
+
957
+ def initialize(number = nil)
958
+ super('decimal')
959
+
960
+ self.text = number
961
+ end
962
+ end
963
+
964
+ class ExData < XFA::Element
965
+ xfa_attribute 'contentType'
966
+ xfa_attribute 'href'
967
+ xfa_attribute 'id'
968
+ xfa_attribute 'maxLength'
969
+ xfa_attribute 'name'
970
+ xfa_attribute 'rid'
971
+ xfa_attribute 'transferEncoding'
972
+ xfa_attribute 'use'
973
+ xfa_attribute 'usehref'
974
+
975
+ def initialize(data = nil)
976
+ super('exData')
977
+
978
+ self.text = data
979
+ end
980
+ end
981
+
982
+ class Float < XFA::Element
983
+ xfa_attribute 'id'
984
+ xfa_attribute 'name'
985
+ xfa_attribute 'use'
986
+ xfa_attribute 'usehref'
987
+
988
+ def initialize(float = nil)
989
+ super('float')
990
+
991
+ self.text = float
992
+ end
993
+ end
994
+
995
+ class Image < XFA::Element
996
+ xfa_attribute 'aspect'
997
+ xfa_attribute 'contentType'
998
+ xfa_attribute 'href'
999
+ xfa_attribute 'id'
1000
+ xfa_attribute 'name'
1001
+ xfa_attribute 'transferEncoding'
1002
+ xfa_attribute 'use'
1003
+ xfa_attribute 'usehref'
1004
+
1005
+ def initialize(data = nil)
1006
+ super('image')
1007
+
1008
+ self.text = data
1009
+ end
1010
+ end
1011
+
1012
+ class Integer < XFA::Element
1013
+ xfa_attribute 'id'
1014
+ xfa_attribute 'name'
1015
+ xfa_attribute 'use'
1016
+ xfa_attribute 'usehref'
1017
+
1018
+ def initialize(int = nil)
1019
+ super('integer')
1020
+
1021
+ self.text = int
1022
+ end
1023
+ end
1024
+
1025
+ class Text < XFA::Element
1026
+ xfa_attribute 'id'
1027
+ xfa_attribute 'maxChars'
1028
+ xfa_attribute 'name'
1029
+ xfa_attribute 'rid'
1030
+ xfa_attribute 'use'
1031
+ xfa_attribute 'usehref'
1032
+
1033
+ def initialize(text = "")
1034
+ super('text')
1035
+
1036
+ self.text = text
1037
+ end
1038
+ end
1039
+
1040
+ class Time < XFA::Element
1041
+ xfa_attribute 'id'
1042
+ xfa_attribute 'name'
1043
+ xfa_attribute 'use'
1044
+ xfa_attribute 'usehref'
1045
+
1046
+ def initialize(time = nil)
1047
+ super('time')
1048
+
1049
+ self.text = time
1050
+ end
1051
+ end
1052
+
1053
+ class Extras < XFA::Element
1054
+ xfa_attribute 'id'
1055
+ xfa_attribute 'name'
1056
+ xfa_attribute 'use'
1057
+ xfa_attribute 'usehref'
1058
+
1059
+ xfa_node 'boolean', Template::Boolean
1060
+ xfa_node 'date', Template::Date
1061
+ xfa_node 'dateTime', Template::DateTime
1062
+ xfa_node 'decimal', Template::Decimal
1063
+ xfa_node 'exData', Template::ExData
1064
+ xfa_node 'extras', Template::Extras
1065
+ xfa_node 'float', Template::Float
1066
+ xfa_node 'image', Template::Image
1067
+ xfa_node 'integer', Template::Integer
1068
+ xfa_node 'text', Template::Text
1069
+ xfa_node 'time', Template::Time
1070
+
1071
+ def initialize
1072
+ super('extras')
1073
+ end
1074
+ end
1075
+
1076
+ class Speak < XFA::Element
1077
+ xfa_attribute 'disable'
1078
+ xfa_attribute 'id'
1079
+ xfa_attribute 'priority'
1080
+ xfa_attribute 'rid'
1081
+ xfa_attribute 'use'
1082
+ xfa_attribute 'usehref'
1083
+
1084
+ def initialize(text = "")
1085
+ super('speak')
1086
+
1087
+ self.text = text
1088
+ end
1089
+ end
1090
+
1091
+ class ToolTip < XFA::Element
1092
+ xfa_attribute 'id'
1093
+ xfa_attribute 'rid'
1094
+ xfa_attribute 'use'
1095
+ xfa_attribute 'usehref'
1096
+
1097
+ def initialize(text = "")
1098
+ super('toolTip')
1099
+ end
1100
+ end
1101
+
1102
+ class Assist < XFA::Element
1103
+ xfa_attribute 'id'
1104
+ xfa_attribute 'role'
1105
+ xfa_attribute 'use'
1106
+ xfa_attribute 'usehref'
1107
+
1108
+ xfa_node 'speak', Template::Speak, 0..1
1109
+ xfa_node 'toolTip', Template::ToolTip, 0..1
1110
+
1111
+ def initialize
1112
+ super('assist')
1113
+ end
1114
+ end
1115
+
1116
+ class Picture < XFA::Element
1117
+ xfa_attribute 'id'
1118
+ xfa_attribute 'use'
1119
+ xfa_attribute 'usehref'
1120
+
1121
+ def initialize(data = nil)
1122
+ super('picture')
1123
+
1124
+ self.text = data
1125
+ end
1126
+ end
1127
+
1128
+ class Bind < XFA::Element
1129
+ xfa_attribute 'match'
1130
+ xfa_attribute 'ref'
1131
+
1132
+ xfa_node 'picture', Template::Picture, 0..1
1133
+
1134
+ def initialize
1135
+ super('bind')
1136
+ end
1137
+ end
1138
+
1139
+ class Bookend < XFA::Element
1140
+ xfa_attribute 'id'
1141
+ xfa_attribute 'leader'
1142
+ xfa_attribute 'trailer'
1143
+ xfa_attribute 'use'
1144
+ xfa_attribute 'usehref'
1145
+
1146
+ def initialize
1147
+ super('bookend')
1148
+ end
1149
+ end
1150
+
1151
+ class Color < XFA::Element
1152
+ xfa_attribute 'cSpace'
1153
+ xfa_attribute 'id'
1154
+ xfa_attribute 'use'
1155
+ xfa_attribute 'usehref'
1156
+ xfa_attribute 'value'
1157
+
1158
+ xfa_node 'extras', Template::Extras, 0..1
1159
+
1160
+ def initialize
1161
+ super('color')
1162
+
1163
+ self.cSpace = "SRGB"
1164
+ end
1165
+ end
1166
+
1167
+ class Corner < XFA::Element
1168
+ xfa_attribute 'id'
1169
+ xfa_attribute 'inverted'
1170
+ xfa_attribute 'join'
1171
+ xfa_attribute 'presence'
1172
+ xfa_attribute 'radius'
1173
+ xfa_attribute 'stroke'
1174
+ xfa_attribute 'thickness'
1175
+ xfa_attribute 'use'
1176
+ xfa_attribute 'usehref'
1177
+
1178
+ xfa_node 'color', Template::Color, 0..1
1179
+ xfa_node 'extras', Template::Extras, 0..1
1180
+
1181
+ def initialize
1182
+ super('corner')
1183
+ end
1184
+ end
1185
+
1186
+ class Edge < XFA::Element
1187
+ xfa_attribute 'cap'
1188
+ xfa_attribute 'id'
1189
+ xfa_attribute 'presence'
1190
+ xfa_attribute 'stroke'
1191
+ xfa_attribute 'thickness'
1192
+ xfa_attribute 'use'
1193
+ xfa_attribute 'usehref'
1194
+
1195
+ xfa_node 'color', Template::Color, 0..1
1196
+ xfa_node 'extras', Template::Extras, 0..1
1197
+
1198
+ def initialize
1199
+ super('edge')
1200
+ end
1201
+ end
1202
+
1203
+ class Linear < XFA::Element
1204
+ xfa_attribute 'id'
1205
+ xfa_attribute 'type'
1206
+ xfa_attribute 'use'
1207
+ xfa_attribute 'usehref'
1208
+
1209
+ xfa_node 'color', Template::Color, 0..1
1210
+ xfa_node 'extras', Template::Extras, 0..1
1211
+
1212
+ def initialize
1213
+ super('linear')
1214
+ end
1215
+ end
1216
+
1217
+ class Pattern < XFA::Element
1218
+ xfa_attribute 'id'
1219
+ xfa_attribute 'type'
1220
+ xfa_attribute 'use'
1221
+ xfa_attribute 'usehref'
1222
+
1223
+ xfa_node 'color', Template::Color, 0..1
1224
+ xfa_node 'extras', Template::Extras, 0..1
1225
+
1226
+ def initialize
1227
+ super('pattern')
1228
+ end
1229
+ end
1230
+
1231
+ class Radial < XFA::Element
1232
+ xfa_attribute 'id'
1233
+ xfa_attribute 'type'
1234
+ xfa_attribute 'use'
1235
+ xfa_attribute 'usehref'
1236
+
1237
+ xfa_node 'color', Template::Color, 0..1
1238
+ xfa_node 'extras', Template::Extras, 0..1
1239
+
1240
+ def initialize
1241
+ super('radial')
1242
+ end
1243
+ end
1244
+
1245
+ class Solid < XFA::Element
1246
+ xfa_attribute 'id'
1247
+ xfa_attribute 'use'
1248
+ xfa_attribute 'usehref'
1249
+
1250
+ xfa_node 'extras', Template::Extras, 0..1
1251
+
1252
+ def initialize
1253
+ super('solid')
1254
+ end
1255
+ end
1256
+
1257
+ class Stipple < XFA::Element
1258
+ xfa_attribute 'id'
1259
+ xfa_attribute 'rate'
1260
+ xfa_attribute 'use'
1261
+ xfa_attribute 'usehref'
1262
+
1263
+ xfa_node 'color', Template::Color, 0..1
1264
+ xfa_node 'extras', Template::Extras, 0..1
1265
+
1266
+ def initialize
1267
+ super('stipple')
1268
+ end
1269
+ end
1270
+
1271
+ class Fill < XFA::Element
1272
+ xfa_attribute 'id'
1273
+ xfa_attribute 'presence'
1274
+ xfa_attribute 'use'
1275
+ xfa_attribute 'usehref'
1276
+
1277
+ xfa_node 'color', Template::Color, 0..1
1278
+ xfa_node 'extras', Template::Extras, 0..1
1279
+ xfa_node 'linear', Template::Linear, 0..1
1280
+ xfa_node 'pattern', Template::Pattern, 0..1
1281
+ xfa_node 'radial', Template::Radial, 0..1
1282
+ xfa_node 'solid', Template::Solid, 0..1
1283
+ xfa_node 'stipple', Template::Stipple, 0..1
1284
+
1285
+ def initialize
1286
+ super('fill')
1287
+ end
1288
+ end
1289
+
1290
+ class Margin < XFA::Element
1291
+ xfa_attribute 'bottomInset'
1292
+ xfa_attribute 'id'
1293
+ xfa_attribute 'leftInset'
1294
+ xfa_attribute 'rightInset'
1295
+ xfa_attribute 'topInset'
1296
+ xfa_attribute 'use'
1297
+ xfa_attribute 'usehref'
1298
+
1299
+ xfa_node 'extras', Template::Extras, 0..1
1300
+
1301
+ def initialize
1302
+ super('margin')
1303
+ end
1304
+ end
1305
+
1306
+ class Border < XFA::Element
1307
+ xfa_attribute 'break'
1308
+ xfa_attribute 'hand'
1309
+ xfa_attribute 'id'
1310
+ xfa_attribute 'presence'
1311
+ xfa_attribute 'relevant'
1312
+ xfa_attribute 'use'
1313
+ xfa_attribute 'usehref'
1314
+
1315
+ xfa_node 'corner', Template::Corner, 0..4
1316
+ xfa_node 'edge', Template::Edge, 0..4
1317
+ xfa_node 'extras', Template::Extras, 0..1
1318
+ xfa_node 'fill', Template::Fill, 0..1
1319
+ xfa_node 'margin', Template::Margin, 0..1
1320
+
1321
+ def initialize
1322
+ super('border')
1323
+ end
1324
+ end
1325
+
1326
+ class Break < XFA::Element
1327
+ xfa_attribute 'after'
1328
+ xfa_attribute 'afterTarget'
1329
+ xfa_attribute 'before'
1330
+ xfa_attribute 'beforeTarget'
1331
+ xfa_attribute 'bookendLeader'
1332
+ xfa_attribute 'bookendTrailer'
1333
+ xfa_attribute 'id'
1334
+ xfa_attribute 'overflowLeader'
1335
+ xfa_attribute 'overflowTarget'
1336
+ xfa_attribute 'overflowTrailer'
1337
+ xfa_attribute 'startNew'
1338
+ xfa_attribute 'use'
1339
+ xfa_attribute 'usehref'
1340
+
1341
+ xfa_node 'extras', Template::Extras, 0..1
1342
+
1343
+ def initialize
1344
+ super('break')
1345
+ end
1346
+ end
1347
+
1348
+ class Message < XFA::Element
1349
+ xfa_attribute 'id'
1350
+ xfa_attribute 'use'
1351
+ xfa_attribute 'usehref'
1352
+
1353
+ xfa_node 'text', Template::Text
1354
+
1355
+ def initialize
1356
+ super('message')
1357
+ end
1358
+ end
1359
+
1360
+ class Script < XFA::Element
1361
+ xfa_attribute 'binding'
1362
+ xfa_attribute 'contentType'
1363
+ xfa_attribute 'id'
1364
+ xfa_attribute 'name'
1365
+ xfa_attribute 'runAt'
1366
+ xfa_attribute 'use'
1367
+ xfa_attribute 'usehref'
1368
+
1369
+ def initialize(script = "")
1370
+ super('script')
1371
+
1372
+ self.text = script
1373
+ end
1374
+ end
1375
+
1376
+ class JavaScript < Script
1377
+ def initialize(script = "")
1378
+ super(script)
1379
+
1380
+ self.contentType = 'application/x-javascript'
1381
+ end
1382
+ end
1383
+
1384
+ class FormCalcScript < Script
1385
+ def initialize(script = "")
1386
+ super(script)
1387
+
1388
+ self.contentType = 'application/x-formcalc'
1389
+ end
1390
+ end
1391
+
1392
+ class Calculate < XFA::Element
1393
+ xfa_attribute 'id'
1394
+ xfa_attribute 'override'
1395
+ xfa_attribute 'use'
1396
+ xfa_attribute 'usehref'
1397
+
1398
+ xfa_node 'extras', Template::Extras, 0..1
1399
+ xfa_node 'message', Template::Message, 0..1
1400
+ xfa_node 'script', Template::Script, 0..1
1401
+
1402
+ def initialize
1403
+ super('calculate')
1404
+ end
1405
+ end
1406
+
1407
+ class Desc < XFA::Element
1408
+ xfa_attribute 'id'
1409
+ xfa_attribute 'use'
1410
+ xfa_attribute 'usehref'
1411
+
1412
+ xfa_node 'boolean', Template::Boolean
1413
+ xfa_node 'date', Template::Date
1414
+ xfa_node 'dateTime', Template::DateTime
1415
+ xfa_node 'decimal', Template::Decimal
1416
+ xfa_node 'exData', Template::ExData
1417
+ xfa_node 'float', Template::Float
1418
+ xfa_node 'image', Template::Image
1419
+ xfa_node 'integer', Template::Integer
1420
+ xfa_node 'text', Template::Text
1421
+ xfa_node 'time', Template::Time
1422
+
1423
+ def initialize
1424
+ super('desc')
1425
+ end
1426
+ end
1427
+
1428
+ class Keep < XFA::Element
1429
+ xfa_attribute 'id'
1430
+ xfa_attribute 'intact'
1431
+ xfa_attribute 'next'
1432
+ xfa_attribute 'previous'
1433
+ xfa_attribute 'use'
1434
+ xfa_attribute 'usehref'
1435
+
1436
+ xfa_node 'extras', Template::Extras, 0..1
1437
+
1438
+ NONE = "none"
1439
+ CONTENTAREA = "contentArea"
1440
+ PAGEAREA = "pageArea"
1441
+
1442
+ def initialize
1443
+ super('keep')
1444
+ end
1445
+ end
1446
+
1447
+ class Occur < XFA::Element
1448
+ xfa_attribute 'id'
1449
+ xfa_attribute 'initial'
1450
+ xfa_attribute 'max'
1451
+ xfa_attribute 'min'
1452
+ xfa_attribute 'use'
1453
+ xfa_attribute 'usehref'
1454
+
1455
+ xfa_node 'extras', Template::Extras, 0..1
1456
+
1457
+ def initialize
1458
+ super('occur')
1459
+ end
1460
+ end
1461
+
1462
+ class Overflow < XFA::Element
1463
+ xfa_attribute 'id'
1464
+ xfa_attribute 'leader'
1465
+ xfa_attribute 'target'
1466
+ xfa_attribute 'trailer'
1467
+ xfa_attribute 'use'
1468
+ xfa_attribute 'usehref'
1469
+
1470
+ def initialize
1471
+ super('overflow')
1472
+ end
1473
+ end
1474
+
1475
+ class Medium < XFA::Element
1476
+ xfa_attribute 'id'
1477
+ xfa_attribute 'imagingBBox'
1478
+ xfa_attribute 'long'
1479
+ xfa_attribute 'orientation'
1480
+ xfa_attribute 'short'
1481
+ xfa_attribute 'stock'
1482
+ xfa_attribute 'trayIn'
1483
+ xfa_attribute 'trayOut'
1484
+ xfa_attribute 'use'
1485
+ xfa_attribute 'usehref'
1486
+
1487
+ def initialize
1488
+ super('medium')
1489
+ end
1490
+ end
1491
+
1492
+ class Font < XFA::Element
1493
+ xfa_attribute 'baselineShift'
1494
+ xfa_attribute 'fontHorizontalScale'
1495
+ xfa_attribute 'fontVerticalScale'
1496
+ xfa_attribute 'id'
1497
+ xfa_attribute 'kerningMode'
1498
+ xfa_attribute 'letterSpacing'
1499
+ xfa_attribute 'lineThrough'
1500
+ xfa_attribute 'lineThroughPeriod'
1501
+ xfa_attribute 'overline'
1502
+ xfa_attribute 'overlinePeriod'
1503
+ xfa_attribute 'posture'
1504
+ xfa_attribute 'size'
1505
+ xfa_attribute 'typeface'
1506
+ xfa_attribute 'underline'
1507
+ xfa_attribute 'underlinePeriod'
1508
+ xfa_attribute 'use'
1509
+ xfa_attribute 'usehref'
1510
+ xfa_attribute 'weight'
1511
+
1512
+ xfa_node 'extras', Template::Extras, 0..1
1513
+ xfa_node 'fill', Template::Fill, 0..1
1514
+
1515
+ def initialize
1516
+ super('font')
1517
+ end
1518
+ end
1519
+
1520
+ class Hyphenation < XFA::Element
1521
+ xfa_attribute 'excludeAllCaps'
1522
+ xfa_attribute 'excludeInitialCap'
1523
+ xfa_attribute 'hyphenate'
1524
+ xfa_attribute 'id'
1525
+ xfa_attribute 'pushCharacterCount'
1526
+ xfa_attribute 'remainCharacterCount'
1527
+ xfa_attribute 'use'
1528
+ xfa_attribute 'usehref'
1529
+ xfa_attribute 'wordCharacterCount'
1530
+
1531
+ def initialize
1532
+ super('hyphenation')
1533
+ end
1534
+ end
1535
+
1536
+ class Para < XFA::Element
1537
+ xfa_attribute 'hAlign'
1538
+ xfa_attribute 'id'
1539
+ xfa_attribute 'lineHeight'
1540
+ xfa_attribute 'marginLeft'
1541
+ xfa_attribute 'marginRight'
1542
+ xfa_attribute 'orphans'
1543
+ xfa_attribute 'preserve'
1544
+ xfa_attribute 'radixOffset'
1545
+ xfa_attribute 'spaceAbove'
1546
+ xfa_attribute 'spaceBelow'
1547
+ xfa_attribute 'tabDefault'
1548
+ xfa_attribute 'tabStops'
1549
+ xfa_attribute 'textIndent'
1550
+ xfa_attribute 'use'
1551
+ xfa_attribute 'usehref'
1552
+ xfa_attribute 'vAlign'
1553
+ xfa_attribute 'widows'
1554
+
1555
+ xfa_node 'hyphenation', Template::Hyphenation, 0..1
1556
+
1557
+ def initialize
1558
+ super('para')
1559
+ end
1560
+ end
1561
+
1562
+ class Arc < XFA::Element
1563
+ xfa_attribute 'circular'
1564
+ xfa_attribute 'hand'
1565
+ xfa_attribute 'id'
1566
+ xfa_attribute 'startAngle'
1567
+ xfa_attribute 'sweepAngle'
1568
+ xfa_attribute 'use'
1569
+ xfa_attribute 'usehref'
1570
+
1571
+ xfa_node 'edge', Template::Edge, 0..1
1572
+ xfa_node 'fill', Template::Fill, 0..1
1573
+
1574
+ def initialize
1575
+ super('arc')
1576
+ end
1577
+ end
1578
+
1579
+ class Line < XFA::Element
1580
+ xfa_attribute 'hand'
1581
+ xfa_attribute 'id'
1582
+ xfa_attribute 'slope'
1583
+ xfa_attribute 'use'
1584
+ xfa_attribute 'usehref'
1585
+
1586
+ xfa_node 'edge', Template::Edge, 0..1
1587
+
1588
+ def initialize
1589
+ super('line')
1590
+ end
1591
+ end
1592
+
1593
+ class Corner < XFA::Element
1594
+ xfa_attribute 'id'
1595
+ xfa_attribute 'inverted'
1596
+ xfa_attribute 'join'
1597
+ xfa_attribute 'presence'
1598
+ xfa_attribute 'radius'
1599
+ xfa_attribute 'stroke'
1600
+ xfa_attribute 'thickness'
1601
+ xfa_attribute 'use'
1602
+ xfa_attribute 'usehref'
1603
+
1604
+ xfa_node 'color', Template::Color, 0..1
1605
+ xfa_node 'extras', Template::Extras, 0..1
1606
+
1607
+ def initialize
1608
+ super('corner')
1609
+ end
1610
+ end
1611
+
1612
+ class Rectangle < XFA::Element
1613
+ xfa_attribute 'hand'
1614
+ xfa_attribute 'id'
1615
+ xfa_attribute 'use'
1616
+ xfa_attribute 'usehref'
1617
+
1618
+ xfa_node 'corner', Template::Corner, 0..4
1619
+ xfa_node 'edge', Template::Edge, 0..4
1620
+ xfa_node 'fill', Template::Fill, 0..4
1621
+
1622
+ def initialize
1623
+ super('rectangle')
1624
+ end
1625
+ end
1626
+
1627
+ class Value < XFA::Element
1628
+ xfa_attribute 'id'
1629
+ xfa_attribute 'override'
1630
+ xfa_attribute 'relevant'
1631
+ xfa_attribute 'use'
1632
+ xfa_attribute 'usehref'
1633
+
1634
+ xfa_node 'arc', Template::Arc, 0..1
1635
+ xfa_node 'boolean', Template::Boolean, 0..1
1636
+ xfa_node 'date', Template::Date, 0..1
1637
+ xfa_node 'dateTime', Template::DateTime, 0..1
1638
+ xfa_node 'decimal', Template::Decimal, 0..1
1639
+ xfa_node 'exData', Template::ExData, 0..1
1640
+ xfa_node 'float', Template::Float, 0..1
1641
+ xfa_node 'image', Template::Image, 0..1
1642
+ xfa_node 'integer', Template::Integer, 0..1
1643
+ xfa_node 'line', Template::Line, 0..1
1644
+ xfa_node 'rectangle', Template::Rectangle, 0..1
1645
+ xfa_node 'text', Template::Text, 0..1
1646
+ xfa_node 'time', Template::Time, 0..1
1647
+
1648
+ def initialize
1649
+ super('value')
1650
+ end
1651
+ end
1652
+
1653
+ class Caption < XFA::Element
1654
+ xfa_attribute 'id'
1655
+ xfa_attribute 'placement'
1656
+ xfa_attribute 'presence'
1657
+ xfa_attribute 'reserve'
1658
+ xfa_attribute 'use'
1659
+ xfa_attribute 'usehref'
1660
+
1661
+ xfa_node 'extras', Template::Extras, 0..1
1662
+ xfa_node 'font', Template::Font, 0..1
1663
+ xfa_node 'margin', Template::Margin, 0..1
1664
+ xfa_node 'para', Template::Para, 0..1
1665
+ xfa_node 'value', Template::Value, 0..1
1666
+
1667
+ def initialize
1668
+ super('caption')
1669
+ end
1670
+ end
1671
+
1672
+ class Traverse < XFA::Element
1673
+ xfa_attribute 'id'
1674
+ xfa_attribute 'operation'
1675
+ xfa_attribute 'ref'
1676
+ xfa_attribute 'use'
1677
+ xfa_attribute 'usehref'
1678
+
1679
+ xfa_node 'extras', Template::Extras, 0..1
1680
+ xfa_node 'script', Template::Script, 0..1
1681
+
1682
+ def initialize
1683
+ super('traverse')
1684
+ end
1685
+ end
1686
+
1687
+ class Traversal < XFA::Element
1688
+ xfa_attribute 'id'
1689
+ xfa_attribute 'use'
1690
+ xfa_attribute 'usehref'
1691
+
1692
+ xfa_node 'extras', Template::Extras, 0..1
1693
+
1694
+ xfa_node 'traverse', Template::Traverse
1695
+
1696
+ def initialize
1697
+ super('traversal')
1698
+ end
1699
+ end
1700
+
1701
+ class Certificate < XFA::Element
1702
+ xfa_attribute 'id'
1703
+ xfa_attribute 'name'
1704
+ xfa_attribute 'use'
1705
+ xfa_attribute 'usehref'
1706
+
1707
+ def initialize(b64data = nil)
1708
+ super('certificate')
1709
+
1710
+ self.text = b64data
1711
+ end
1712
+ end
1713
+
1714
+ class Encrypt < XFA::Element
1715
+ xfa_attribute 'id'
1716
+ xfa_attribute 'use'
1717
+ xfa_attribute 'usehref'
1718
+
1719
+ xfa_node 'certificate', Template::Certificate, 0..1
1720
+
1721
+ def initialize
1722
+ super('encrypt')
1723
+ end
1724
+ end
1725
+
1726
+ class Barcode < XFA::Element
1727
+ xfa_attribute 'charEncoding'
1728
+ xfa_attribute 'checksum'
1729
+ xfa_attribute 'dataColumnCount'
1730
+ xfa_attribute 'dataLength'
1731
+ xfa_attribute 'dataPrep'
1732
+ xfa_attribute 'dataRowCount'
1733
+ xfa_attribute 'endChar'
1734
+ xfa_attribute 'errorConnectionLevel'
1735
+ xfa_attribute 'id'
1736
+ xfa_attribute 'moduleHeight'
1737
+ xfa_attribute 'moduleWidth'
1738
+ xfa_attribute 'printCheckDigit'
1739
+ xfa_attribute 'rowColumnRatio'
1740
+ xfa_attribute 'startChar'
1741
+ xfa_attribute 'textLocation'
1742
+ xfa_attribute 'truncate'
1743
+ xfa_attribute 'type'
1744
+ xfa_attribute 'upsMode'
1745
+ xfa_attribute 'use'
1746
+ xfa_attribute 'usehref'
1747
+ xfa_attribute 'wideNarrowRatio'
1748
+
1749
+ xfa_node 'encrypt', Template::Encrypt, 0..1
1750
+ xfa_node 'extras', Template::Extras, 0..1
1751
+
1752
+ def initialize
1753
+ super('barcode')
1754
+ end
1755
+ end
1756
+
1757
+ class Button < XFA::Element
1758
+ xfa_attribute 'highlight'
1759
+ xfa_attribute 'id'
1760
+ xfa_attribute 'use'
1761
+ xfa_attribute 'usehref'
1762
+
1763
+ xfa_node 'extras', Template::Extras, 0..1
1764
+
1765
+ def initialize
1766
+ super('button')
1767
+ end
1768
+ end
1769
+
1770
+ class CheckButton < XFA::Element
1771
+ xfa_attribute 'id'
1772
+ xfa_attribute 'mark'
1773
+ xfa_attribute 'shape'
1774
+ xfa_attribute 'size'
1775
+ xfa_attribute 'use'
1776
+ xfa_attribute 'usehref'
1777
+
1778
+ xfa_node 'border', Template::Border, 0..1
1779
+ xfa_node 'extras', Template::Extras, 0..1
1780
+ xfa_node 'margin', Template::Margin, 0..1
1781
+
1782
+ def initialize
1783
+ super('checkButton')
1784
+ end
1785
+ end
1786
+
1787
+ class ChoiceList < XFA::Element
1788
+ xfa_attribute 'commitOn'
1789
+ xfa_attribute 'id'
1790
+ xfa_attribute 'open'
1791
+ xfa_attribute 'textEntry'
1792
+ xfa_attribute 'use'
1793
+ xfa_attribute 'usehref'
1794
+
1795
+ xfa_node 'border', Template::Border, 0..1
1796
+ xfa_node 'extras', Template::Extras, 0..1
1797
+ xfa_node 'margin', Template::Margin, 0..1
1798
+
1799
+ def initialize
1800
+ super('choiceList')
1801
+ end
1802
+ end
1803
+
1804
+ class Comb < XFA::Element
1805
+ xfa_attribute 'id'
1806
+ xfa_attribute 'numberOfCells'
1807
+ xfa_attribute 'use'
1808
+ xfa_attribute 'usehref'
1809
+
1810
+ def initialize
1811
+ super('comb')
1812
+ end
1813
+ end
1814
+
1815
+ class DateTimeEdit < XFA::Element
1816
+ xfa_attribute 'hScrollPolicy'
1817
+ xfa_attribute 'id'
1818
+ xfa_attribute 'picker'
1819
+ xfa_attribute 'use'
1820
+ xfa_attribute 'usehref'
1821
+
1822
+ xfa_node 'border', Template::Border, 0..1
1823
+ xfa_node 'comb', Template::Comb, 0..1
1824
+ xfa_node 'extras', Template::Extras, 0..1
1825
+ xfa_node 'margin', Template::Margin, 0..1
1826
+
1827
+ def initialize
1828
+ super('dateTimeEdit')
1829
+ end
1830
+ end
1831
+
1832
+ class DefaultUI < XFA::Element
1833
+ xfa_attribute 'id'
1834
+ xfa_attribute 'use'
1835
+ xfa_attribute 'usehref'
1836
+
1837
+ xfa_node 'extras', Template::Extras, 0..1
1838
+
1839
+ def initialize
1840
+ super('defaultUi')
1841
+ end
1842
+ end
1843
+
1844
+ class ImageEdit < XFA::Element
1845
+ xfa_attribute 'data'
1846
+ xfa_attribute 'id'
1847
+ xfa_attribute 'use'
1848
+ xfa_attribute 'usehref'
1849
+
1850
+ xfa_node 'border', Template::Border, 0..1
1851
+ xfa_node 'extras', Template::Extras, 0..1
1852
+ xfa_node 'margin', Template::Margin, 0..1
1853
+
1854
+ def initialize
1855
+ super('imageEdit')
1856
+ end
1857
+ end
1858
+
1859
+ class NumericEdit < XFA::Element
1860
+ xfa_attribute 'hScrollPolicy'
1861
+ xfa_attribute 'id'
1862
+ xfa_attribute 'use'
1863
+ xfa_attribute 'usehref'
1864
+
1865
+ xfa_node 'border', Template::Border, 0..1
1866
+ xfa_node 'comb', Template::Comb, 0..1
1867
+ xfa_node 'extras', Template::Extras, 0..1
1868
+ xfa_node 'margin', Template::Margin, 0..1
1869
+
1870
+ def initialize
1871
+ super('numericEdit')
1872
+ end
1873
+ end
1874
+
1875
+ class PasswordEdit < XFA::Element
1876
+ xfa_attribute 'hScrollPolicy'
1877
+ xfa_attribute 'id'
1878
+ xfa_attribute 'passwordChar'
1879
+ xfa_attribute 'use'
1880
+ xfa_attribute 'usehref'
1881
+
1882
+ xfa_node 'border', Template::Border, 0..1
1883
+ xfa_node 'extras', Template::Extras, 0..1
1884
+ xfa_node 'margin', Template::Margin, 0..1
1885
+
1886
+ def initialize
1887
+ super('passwordEdit')
1888
+ end
1889
+ end
1890
+
1891
+ class AppearanceFilter < XFA::Element
1892
+ xfa_attribute 'id'
1893
+ xfa_attribute 'type'
1894
+ xfa_attribute 'use'
1895
+ xfa_attribute 'usehref'
1896
+
1897
+ def initialize(name = "")
1898
+ super('appearanceFilter')
1899
+
1900
+ self.text = name
1901
+ end
1902
+ end
1903
+
1904
+ class Issuers < XFA::Element
1905
+ xfa_attribute 'id'
1906
+ xfa_attribute 'type'
1907
+ xfa_attribute 'use'
1908
+ xfa_attribute 'usehref'
1909
+
1910
+ xfa_node 'certificate', Template::Certificate
1911
+
1912
+ def initialize
1913
+ super('issuers')
1914
+ end
1915
+ end
1916
+
1917
+ class KeyUsage < XFA::Element
1918
+ xfa_attribute 'crlSign'
1919
+ xfa_attribute 'dataEncipherment'
1920
+ xfa_attribute 'decipherOnly'
1921
+ xfa_attribute 'digitalSignature'
1922
+ xfa_attribute 'encipherOnly'
1923
+ xfa_attribute 'id'
1924
+ xfa_attribute 'keyAgreement'
1925
+ xfa_attribute 'keyCertSign'
1926
+ xfa_attribute 'keyEncipherment'
1927
+ xfa_attribute 'nonRepudiation'
1928
+ xfa_attribute 'type'
1929
+ xfa_attribute 'use'
1930
+ xfa_attribute 'usehref'
1931
+
1932
+ def initialize
1933
+ super('keyUsage')
1934
+ end
1935
+ end
1936
+
1937
+ class OID < XFA::Element
1938
+ xfa_attribute 'id'
1939
+ xfa_attribute 'name'
1940
+ xfa_attribute 'use'
1941
+ xfa_attribute 'usehref'
1942
+
1943
+ def initialize(oid = "")
1944
+ super('oid')
1945
+
1946
+ self.text = oid
1947
+ end
1948
+ end
1949
+
1950
+ class OIDs < XFA::Element
1951
+ xfa_attribute 'id'
1952
+ xfa_attribute 'type'
1953
+ xfa_attribute 'use'
1954
+ xfa_attribute 'usehref'
1955
+
1956
+ xfa_node 'oid', Template::OID
1957
+
1958
+ def initialize
1959
+ super('oids')
1960
+ end
1961
+ end
1962
+
1963
+ class Signing < XFA::Element
1964
+ xfa_attribute 'id'
1965
+ xfa_attribute 'type'
1966
+ xfa_attribute 'use'
1967
+ xfa_attribute 'usehref'
1968
+
1969
+ xfa_node 'certificate', Template::Certificate
1970
+
1971
+ def initialize
1972
+ super('signing')
1973
+ end
1974
+ end
1975
+
1976
+ class SubjectDN < XFA::Element
1977
+ xfa_attribute 'delimiter'
1978
+ xfa_attribute 'id'
1979
+ xfa_attribute 'name'
1980
+ xfa_attribute 'use'
1981
+ xfa_attribute 'usehref'
1982
+
1983
+ def initialize(data = "")
1984
+ super('subjectDN')
1985
+
1986
+ self.text = data
1987
+ end
1988
+ end
1989
+
1990
+ class SubjectDNs < XFA::Element
1991
+ xfa_attribute 'id'
1992
+ xfa_attribute 'type'
1993
+ xfa_attribute 'use'
1994
+ xfa_attribute 'usehref'
1995
+
1996
+ xfa_node 'subjectDN', Template::SubjectDN, 0..1
1997
+
1998
+ def initialize
1999
+ super('subjectDNs')
2000
+ end
2001
+ end
2002
+
2003
+ class Certificates < XFA::Element
2004
+ xfa_attribute 'credentialServerPolicy'
2005
+ xfa_attribute 'id'
2006
+ xfa_attribute 'url'
2007
+ xfa_attribute 'urlPolicy'
2008
+ xfa_attribute 'use'
2009
+ xfa_attribute 'usehref'
2010
+
2011
+ xfa_node 'issuers', Template::Issuers, 0..1
2012
+ xfa_node 'keyUsage', Template::KeyUsage, 0..1
2013
+ xfa_node 'oids', Template::OIDs, 0..1
2014
+ xfa_node 'signing', Template::Signing, 0..1
2015
+ xfa_node 'subjectDNs', Template::SubjectDNs, 0..1
2016
+
2017
+ def initialize
2018
+ super('certificates')
2019
+ end
2020
+ end
2021
+
2022
+ class DigestMethod < XFA::Element
2023
+ xfa_attribute 'id'
2024
+ xfa_attribute 'use'
2025
+ xfa_attribute 'usehref'
2026
+
2027
+ def initialize(method = "")
2028
+ super('digestMethod')
2029
+
2030
+ self.text = method
2031
+ end
2032
+ end
2033
+
2034
+ class DigestMethods < XFA::Element
2035
+ xfa_attribute 'id'
2036
+ xfa_attribute 'type'
2037
+ xfa_attribute 'use'
2038
+ xfa_attribute 'usehref'
2039
+
2040
+ xfa_node 'digestMethod', Template::DigestMethod
2041
+
2042
+ def initialize
2043
+ super('digestMethods')
2044
+ end
2045
+ end
2046
+
2047
+ class Encoding < XFA::Element
2048
+ xfa_attribute 'id'
2049
+ xfa_attribute 'use'
2050
+ xfa_attribute 'usehref'
2051
+
2052
+ def initialize(encoding = "")
2053
+ super('encoding')
2054
+
2055
+ self.text = encoding
2056
+ end
2057
+ end
2058
+
2059
+ class Encodings < XFA::Element
2060
+ xfa_attribute 'id'
2061
+ xfa_attribute 'type'
2062
+ xfa_attribute 'use'
2063
+ xfa_attribute 'usehref'
2064
+
2065
+ xfa_node 'encoding', Template::Encoding
2066
+
2067
+ def initialize
2068
+ super('encodings')
2069
+ end
2070
+ end
2071
+
2072
+ class Handler < XFA::Element
2073
+ xfa_attribute 'id'
2074
+ xfa_attribute 'type'
2075
+ xfa_attribute 'use'
2076
+ xfa_attribute 'usehref'
2077
+
2078
+ def initialize(handler = "")
2079
+ super('handler')
2080
+
2081
+ self.text = handler
2082
+ end
2083
+ end
2084
+
2085
+ class LockDocument < XFA::Element
2086
+ xfa_attribute 'id'
2087
+ xfa_attribute 'type'
2088
+ xfa_attribute 'use'
2089
+ xfa_attribute 'usehref'
2090
+
2091
+ def initialize(lock = "default")
2092
+ super('lockDocument')
2093
+
2094
+ self.text = lock
2095
+ end
2096
+ end
2097
+
2098
+ class MDP < XFA::Element
2099
+ xfa_attribute 'id'
2100
+ xfa_attribute 'permissions'
2101
+ xfa_attribute 'signatureType'
2102
+ xfa_attribute 'use'
2103
+ xfa_attribute 'usehref'
2104
+
2105
+ def initialize
2106
+ super('mdp')
2107
+ end
2108
+ end
2109
+
2110
+ class Reason < XFA::Element
2111
+ xfa_attribute 'id'
2112
+ xfa_attribute 'name'
2113
+ xfa_attribute 'use'
2114
+ xfa_attribute 'usehref'
2115
+
2116
+ def initialize(reason = "")
2117
+ super('reason')
2118
+
2119
+ self.text = reason
2120
+ end
2121
+ end
2122
+
2123
+ class Reasons < XFA::Element
2124
+ xfa_attribute 'id'
2125
+ xfa_attribute 'type'
2126
+ xfa_attribute 'use'
2127
+ xfa_attribute 'usehref'
2128
+
2129
+ xfa_node 'reason', Template::Reason
2130
+
2131
+ def initialize
2132
+ super('reasons')
2133
+ end
2134
+ end
2135
+
2136
+ class TimeStamp < XFA::Element
2137
+ xfa_attribute 'id'
2138
+ xfa_attribute 'server'
2139
+ xfa_attribute 'type'
2140
+ xfa_attribute 'use'
2141
+ xfa_attribute 'usehref'
2142
+
2143
+ def initialize
2144
+ super('timeStamp')
2145
+ end
2146
+ end
2147
+
2148
+ class Filter < XFA::Element
2149
+ xfa_attribute 'addRevocationInfo'
2150
+ xfa_attribute 'id'
2151
+ xfa_attribute 'name'
2152
+ xfa_attribute 'use'
2153
+ xfa_attribute 'usehref'
2154
+ xfa_attribute 'version'
2155
+
2156
+ xfa_node 'appearanceFilter', Template::AppearanceFilter, 0..1
2157
+ xfa_node 'certificates', Template::Certificates, 0..1
2158
+ xfa_node 'digestMethods', Template::DigestMethods, 0..1
2159
+ xfa_node 'encodings', Template::Encodings, 0..1
2160
+ xfa_node 'handler', Template::Handler, 0..1
2161
+ xfa_node 'lockDocument', Template::LockDocument, 0..1
2162
+ xfa_node 'mdp', Template::MDP, 0..1
2163
+ xfa_node 'reasons', Template::Reasons, 0..1
2164
+ xfa_node 'timeStamp', Template::TimeStamp, 0..1
2165
+
2166
+ def initialize
2167
+ super('filter')
2168
+ end
2169
+ end
2170
+
2171
+ class Ref < XFA::Element
2172
+ xfa_attribute 'id'
2173
+ xfa_attribute 'use'
2174
+ xfa_attribute 'usehref'
2175
+
2176
+ def initialize(somexpr = nil)
2177
+ super('ref')
2178
+
2179
+ self.text = somexpr
2180
+ end
2181
+ end
2182
+
2183
+ class Manifest < XFA::Element
2184
+ xfa_attribute 'action'
2185
+ xfa_attribute 'id'
2186
+ xfa_attribute 'name'
2187
+ xfa_attribute 'use'
2188
+ xfa_attribute 'usehref'
2189
+
2190
+ xfa_node 'extras', Template::Extras, 0..1
2191
+
2192
+ xfa_node 'ref', Template::Ref, 0..1
2193
+
2194
+ def initialize
2195
+ super('manifest')
2196
+ end
2197
+ end
2198
+
2199
+ class Signature < XFA::Element
2200
+ xfa_attribute 'id'
2201
+ xfa_attribute 'type'
2202
+ xfa_attribute 'use'
2203
+ xfa_attribute 'usehref'
2204
+
2205
+ xfa_node 'border', Template::Border, 0..1
2206
+ xfa_node 'extras', Template::Extras, 0..1
2207
+ xfa_node 'filter', Template::Filter, 0..1
2208
+ xfa_node 'manifest', Template::Manifest, 0..1
2209
+ xfa_node 'margin', Template::Margin, 0..1
2210
+
2211
+ def initialize
2212
+ super('signature')
2213
+ end
2214
+ end
2215
+
2216
+ class TextEdit < XFA::Element
2217
+ xfa_attribute 'allowRichText'
2218
+ xfa_attribute 'hScrollPolicy'
2219
+ xfa_attribute 'id'
2220
+ xfa_attribute 'multiLine'
2221
+ xfa_attribute 'use'
2222
+ xfa_attribute 'usehref'
2223
+ xfa_attribute 'vScrollPolicy'
2224
+
2225
+ xfa_node 'border', Template::Border, 0..1
2226
+ xfa_node 'comb', Template::Comb, 0..1
2227
+ xfa_node 'extras', Template::Extras, 0..1
2228
+ xfa_node 'margin', Template::Margin, 0..1
2229
+
2230
+ def initialize
2231
+ super('textEdit')
2232
+ end
2233
+ end
2234
+
2235
+ class UI < XFA::Element
2236
+ xfa_attribute 'id'
2237
+ xfa_attribute 'use'
2238
+ xfa_attribute 'usehref'
2239
+
2240
+ xfa_node 'extras', Template::Extras, 0..1
2241
+ xfa_node 'picture', Template::Picture, 0..1
2242
+ xfa_node 'barcode', Template::Barcode, 0..1
2243
+ xfa_node 'button', Template::Button, 0..1
2244
+ xfa_node 'checkButton', Template::CheckButton, 0..1
2245
+ xfa_node 'choiceList', Template::ChoiceList, 0..1
2246
+ xfa_node 'dateTimeEdit', Template::DateTimeEdit, 0..1
2247
+ xfa_node 'defaultUi', Template::DefaultUI, 0..1
2248
+ xfa_node 'imageEdit', Template::ImageEdit, 0..1
2249
+ xfa_node 'numericEdit', Template::NumericEdit, 0..1
2250
+ xfa_node 'passwordEdit', Template::PasswordEdit, 0..1
2251
+ xfa_node 'signature', Template::Signature, 0..1
2252
+ xfa_node 'textEdit', Template::TextEdit, 0..1
2253
+
2254
+ def initialize
2255
+ super('ui')
2256
+ end
2257
+ end
2258
+
2259
+ class SetProperty < XFA::Element
2260
+ xfa_attribute 'connection'
2261
+ xfa_attribute 'ref'
2262
+ xfa_attribute 'target'
2263
+
2264
+ def initialize
2265
+ super('setProperty')
2266
+ end
2267
+ end
2268
+
2269
+ class Draw < XFA::Element
2270
+ xfa_attribute 'anchorType'
2271
+ xfa_attribute 'colSpan'
2272
+ xfa_attribute 'h'
2273
+ xfa_attribute 'id'
2274
+ xfa_attribute 'locale'
2275
+ xfa_attribute 'maxH'
2276
+ xfa_attribute 'maxW'
2277
+ xfa_attribute 'minH'
2278
+ xfa_attribute 'minW'
2279
+ xfa_attribute 'name'
2280
+ xfa_attribute 'presence'
2281
+ xfa_attribute 'relevant'
2282
+ xfa_attribute 'rotate'
2283
+ xfa_attribute 'use'
2284
+ xfa_attribute 'usehref'
2285
+ xfa_attribute 'w'
2286
+ xfa_attribute 'x'
2287
+ xfa_attribute 'y'
2288
+
2289
+ xfa_node 'assist', Template::Assist, 0..1
2290
+ xfa_node 'border', Template::Border, 0..1
2291
+ xfa_node 'caption', Template::Caption, 0..1
2292
+ xfa_node 'desc', Template::Desc, 0..1
2293
+ xfa_node 'extras', Template::Extras, 0..1
2294
+ xfa_node 'font', Template::Font, 0..1
2295
+ xfa_node 'keep', Template::Keep, 0..1
2296
+ xfa_node 'margin', Template::Margin, 0..1
2297
+ xfa_node 'para', Template::Para, 0..1
2298
+ xfa_node 'traversal', Template::Traversal, 0..1
2299
+ xfa_node 'ui', Template::UI, 0..1
2300
+ xfa_node 'value', Template::Value, 0..1
2301
+
2302
+ xfa_node 'setProperty', Template::SetProperty
2303
+
2304
+ def initialize
2305
+ super('draw')
2306
+ end
2307
+ end
2308
+
2309
+ class Validate < XFA::Element
2310
+ xfa_attribute 'formatTest'
2311
+ xfa_attribute 'id'
2312
+ xfa_attribute 'nullTest'
2313
+ xfa_attribute 'scriptTest'
2314
+ xfa_attribute 'use'
2315
+ xfa_attribute 'usehref'
2316
+
2317
+ xfa_node 'extras', Template::Extras, 0..1
2318
+ xfa_node 'message', Template::Message, 0..1
2319
+ xfa_node 'picture', Template::Picture, 0..1
2320
+ xfa_node 'script', Template::Script, 0..1
2321
+
2322
+ def initialize
2323
+ super('validate')
2324
+ end
2325
+ end
2326
+
2327
+ class Connect < XFA::Element
2328
+ xfa_attribute 'connection'
2329
+ xfa_attribute 'id'
2330
+ xfa_attribute 'ref'
2331
+ xfa_attribute 'usage'
2332
+ xfa_attribute 'use'
2333
+ xfa_attribute 'usehref'
2334
+
2335
+ xfa_node 'picture', Template::Picture, 0..1
2336
+
2337
+ def initialize
2338
+ super('connect')
2339
+ end
2340
+ end
2341
+
2342
+ class Execute < XFA::Element
2343
+ xfa_attribute 'connection'
2344
+ xfa_attribute 'executeType'
2345
+ xfa_attribute 'id'
2346
+ xfa_attribute 'runAt'
2347
+ xfa_attribute 'use'
2348
+ xfa_attribute 'usehref'
2349
+
2350
+ def initialize
2351
+ super('execute')
2352
+ end
2353
+ end
2354
+
2355
+ class SignData < XFA::Element
2356
+ xfa_attribute 'id'
2357
+ xfa_attribute 'operation'
2358
+ xfa_attribute 'ref'
2359
+ xfa_attribute 'target'
2360
+ xfa_attribute 'use'
2361
+ xfa_attribute 'usehref'
2362
+
2363
+ xfa_node 'filter', Template::Filter, 0..1
2364
+ xfa_node 'manifest', Template::Manifest, 0..1
2365
+
2366
+ def initialize
2367
+ super('signData')
2368
+ end
2369
+ end
2370
+
2371
+ class Submit < XFA::Element
2372
+ xfa_attribute 'embedPDF'
2373
+ xfa_attribute 'format'
2374
+ xfa_attribute 'id'
2375
+ xfa_attribute 'target'
2376
+ xfa_attribute 'textEncoding'
2377
+ xfa_attribute 'use'
2378
+ xfa_attribute 'usehref'
2379
+ xfa_attribute 'xdpContent'
2380
+
2381
+ xfa_node 'encrypt', Template::Encrypt, 0..1
2382
+
2383
+ xfa_node 'signData', Template::SignData
2384
+
2385
+ def initialize
2386
+ super('submit')
2387
+ end
2388
+ end
2389
+
2390
+ class Event < XFA::Element
2391
+ xfa_attribute 'activity'
2392
+ xfa_attribute 'id'
2393
+ xfa_attribute 'listen'
2394
+ xfa_attribute 'name'
2395
+ xfa_attribute 'ref'
2396
+ xfa_attribute 'use'
2397
+ xfa_attribute 'usehref'
2398
+
2399
+ xfa_node 'extras', Template::Extras, 0..1
2400
+ xfa_node 'execute', Template::Execute, 0..1
2401
+ xfa_node 'script', Template::Script, 0..1
2402
+ xfa_node 'signData', Template::SignData, 0..1
2403
+ xfa_node 'submit', Template::Submit, 0..1
2404
+
2405
+ def initialize
2406
+ super('event')
2407
+ end
2408
+ end
2409
+
2410
+ class Format < XFA::Element
2411
+ xfa_attribute 'id'
2412
+ xfa_attribute 'use'
2413
+ xfa_attribute 'usehref'
2414
+
2415
+ xfa_node 'extras', Template::Extras, 0..1
2416
+ xfa_node 'picture', Template::Picture, 0..1
2417
+
2418
+ def initialize
2419
+ super('format')
2420
+ end
2421
+ end
2422
+
2423
+ class Items < XFA::Element
2424
+ xfa_attribute 'id'
2425
+ xfa_attribute 'name'
2426
+ xfa_attribute 'presence'
2427
+ xfa_attribute 'ref'
2428
+ xfa_attribute 'save'
2429
+ xfa_attribute 'use'
2430
+ xfa_attribute 'usehref'
2431
+
2432
+ xfa_node 'boolean', Template::Boolean
2433
+ xfa_node 'date', Template::Date
2434
+ xfa_node 'dateTime', Template::DateTime
2435
+ xfa_node 'decimal', Template::Decimal
2436
+ xfa_node 'exData', Template::ExData
2437
+ xfa_node 'float', Template::Float
2438
+ xfa_node 'image', Template::Image
2439
+ xfa_node 'integer', Template::Integer
2440
+ xfa_node 'text', Template::Text
2441
+ xfa_node 'time', Template::Time
2442
+
2443
+ def initialize
2444
+ super('items')
2445
+ end
2446
+ end
2447
+
2448
+ class BindItems < XFA::Element
2449
+ xfa_attribute 'connection'
2450
+ xfa_attribute 'labelRef'
2451
+ xfa_attribute 'ref'
2452
+ xfa_attribute 'valueRef'
2453
+
2454
+ def initialize
2455
+ super('bindItems')
2456
+ end
2457
+ end
2458
+
2459
+ class Field < XFA::Element
2460
+ xfa_attribute 'access'
2461
+ xfa_attribute 'accessKey'
2462
+ xfa_attribute 'anchorType'
2463
+ xfa_attribute 'colSpan'
2464
+ xfa_attribute 'h'
2465
+ xfa_attribute 'id'
2466
+ xfa_attribute 'locale'
2467
+ xfa_attribute 'maxH'
2468
+ xfa_attribute 'maxW'
2469
+ xfa_attribute 'minH'
2470
+ xfa_attribute 'minW'
2471
+ xfa_attribute 'name'
2472
+ xfa_attribute 'presence'
2473
+ xfa_attribute 'relevant'
2474
+ xfa_attribute 'rotate'
2475
+ xfa_attribute 'use'
2476
+ xfa_attribute 'usehref'
2477
+ xfa_attribute 'w'
2478
+ xfa_attribute 'x'
2479
+ xfa_attribute 'y'
2480
+
2481
+ xfa_node 'assist', Template::Assist, 0..1
2482
+ xfa_node 'bind', Template::Bind, 0..1
2483
+ xfa_node 'border', Template::Border, 0..1
2484
+ xfa_node 'calculate', Template::Calculate, 0..1
2485
+ xfa_node 'caption', Template::Caption, 0..1
2486
+ xfa_node 'desc', Template::Desc, 0..1
2487
+ xfa_node 'extras', Template::Extras, 0..1
2488
+ xfa_node 'font', Template::Font, 0..1
2489
+ xfa_node 'format', Template::Format, 0..1
2490
+ xfa_node 'items', Template::Items, 0..2
2491
+ xfa_node 'keep', Template::Keep, 0..1
2492
+ xfa_node 'margin', Template::Margin, 0..1
2493
+ xfa_node 'para', Template::Para, 0..1
2494
+ xfa_node 'traversal', Template::Traversal, 0..1
2495
+ xfa_node 'ui', Template::UI, 0..1
2496
+ xfa_node 'validate', Template::Validate, 0..1
2497
+ xfa_node 'value', Template::Value, 0..1
2498
+
2499
+ xfa_node 'bindItems', Template::BindItems
2500
+ xfa_node 'connect', Template::Connect
2501
+ xfa_node 'event', Template::Event
2502
+ xfa_node 'setProperty', Template::SetProperty
2503
+
2504
+ def initialize
2505
+ super('field')
2506
+ end
2507
+ end
2508
+
2509
+
2510
+ class ExclGroup < XFA::Element
2511
+ xfa_attribute 'access'
2512
+ xfa_attribute 'accessKey'
2513
+ xfa_attribute 'anchorType'
2514
+ xfa_attribute 'colSpan'
2515
+ xfa_attribute 'h'
2516
+ xfa_attribute 'id'
2517
+ xfa_attribute 'layout'
2518
+ xfa_attribute 'maxH'
2519
+ xfa_attribute 'maxW'
2520
+ xfa_attribute 'minH'
2521
+ xfa_attribute 'minW'
2522
+ xfa_attribute 'name'
2523
+ xfa_attribute 'presence'
2524
+ xfa_attribute 'relevant'
2525
+ xfa_attribute 'use'
2526
+ xfa_attribute 'usehref'
2527
+ xfa_attribute 'w'
2528
+ xfa_attribute 'x'
2529
+ xfa_attribute 'y'
2530
+
2531
+ xfa_node 'assist', Template::Assist, 0..1
2532
+ xfa_node 'bind', Template::Bind, 0..1
2533
+ xfa_node 'border', Template::Border, 0..1
2534
+ xfa_node 'calculate', Template::Calculate, 0..1
2535
+ xfa_node 'caption', Template::Caption, 0..1
2536
+ xfa_node 'desc', Template::Desc, 0..1
2537
+ xfa_node 'extras', Template::Extras, 0..1
2538
+ xfa_node 'margin', Template::Margin, 0..1
2539
+ xfa_node 'para', Template::Para, 0..1
2540
+ xfa_node 'traversal', Template::Traversal, 0..1
2541
+ xfa_node 'validate', Template::Validate, 0..1
2542
+
2543
+ xfa_node 'connect', Template::Connect
2544
+ xfa_node 'event', Template::Event
2545
+ xfa_node 'field', Template::Field
2546
+ xfa_node 'setProperty', Template::SetProperty
2547
+
2548
+ def initialize
2549
+ super('exclGroup')
2550
+ end
2551
+ end
2552
+
2553
+ class BreakAfter < XFA::Element
2554
+ xfa_attribute 'id'
2555
+ xfa_attribute 'leader'
2556
+ xfa_attribute 'startNew'
2557
+ xfa_attribute 'target'
2558
+ xfa_attribute 'targetType'
2559
+ xfa_attribute 'trailer'
2560
+ xfa_attribute 'use'
2561
+ xfa_attribute 'usehref'
2562
+
2563
+ xfa_node 'script', Template::Script, 0..1
2564
+
2565
+ def initialize
2566
+ super('breakAfter')
2567
+ end
2568
+ end
2569
+
2570
+ class BreakBefore < XFA::Element
2571
+ xfa_attribute 'id'
2572
+ xfa_attribute 'leader'
2573
+ xfa_attribute 'startNew'
2574
+ xfa_attribute 'target'
2575
+ xfa_attribute 'targetType'
2576
+ xfa_attribute 'trailer'
2577
+ xfa_attribute 'use'
2578
+ xfa_attribute 'usehref'
2579
+
2580
+ xfa_node 'script', Template::Script, 0..1
2581
+
2582
+ def initialize
2583
+ super('breakBefore')
2584
+ end
2585
+ end
2586
+
2587
+ class Subform < XFA::Element ; end
2588
+ class SubformSet < XFA::Element
2589
+ xfa_attribute 'id'
2590
+ xfa_attribute 'name'
2591
+ xfa_attribute 'relation'
2592
+ xfa_attribute 'relevant'
2593
+ xfa_attribute 'use'
2594
+ xfa_attribute 'usehref'
2595
+
2596
+ xfa_node 'bookend', Template::Bookend, 0..1
2597
+ xfa_node 'break', Template::Break, 0..1
2598
+ xfa_node 'desc', Template::Desc, 0..1
2599
+ xfa_node 'extras', Template::Extras, 0..1
2600
+ xfa_node 'occur', Template::Occur, 0..1
2601
+ xfa_node 'overflow', Template::Overflow, 0..1
2602
+
2603
+ xfa_node 'breakAfter', Template::BreakAfter
2604
+ xfa_node 'breakBefore', Template::BreakBefore
2605
+ xfa_node 'subform', Template::Subform
2606
+ xfa_node 'subformSet', Template::SubformSet
2607
+
2608
+ def initialize
2609
+ super('subformSet')
2610
+ end
2611
+ end
2612
+
2613
+ class Area < XFA::Element
2614
+ xfa_attribute 'colSpan'
2615
+ xfa_attribute 'id'
2616
+ xfa_attribute 'name'
2617
+ xfa_attribute 'relevant'
2618
+ xfa_attribute 'use'
2619
+ xfa_attribute 'usehref'
2620
+ xfa_attribute 'x'
2621
+ xfa_attribute 'y'
2622
+
2623
+ xfa_node 'desc', Template::Desc, 0..1
2624
+ xfa_node 'extras', Template::Extras, 0..1
2625
+
2626
+ xfa_node 'area', Template::Area
2627
+ xfa_node 'draw', Template::Draw
2628
+ xfa_node 'exclGroup', Template::ExclGroup
2629
+ xfa_node 'field', Template::Field
2630
+ xfa_node 'subform', Template::Subform
2631
+ xfa_node 'subformSet', Template::SubformSet
2632
+
2633
+ def initialize
2634
+ super('area')
2635
+ end
2636
+ end
2637
+
2638
+ class ContentArea < XFA::Element
2639
+ xfa_attribute 'h'
2640
+ xfa_attribute 'id'
2641
+ xfa_attribute 'name'
2642
+ xfa_attribute 'relevant'
2643
+ xfa_attribute 'use'
2644
+ xfa_attribute 'usehref'
2645
+ xfa_attribute 'w'
2646
+ xfa_attribute 'x'
2647
+ xfa_attribute 'y'
2648
+
2649
+ xfa_node 'desc', Template::Desc, 0..1
2650
+ xfa_node 'extras', Template::Extras, 0..1
2651
+
2652
+ def initialize
2653
+ super('contentArea')
2654
+ end
2655
+ end
2656
+
2657
+ class PageArea < XFA::Element
2658
+ xfa_attribute 'blankOrNotBlank'
2659
+ xfa_attribute 'id'
2660
+ xfa_attribute 'initialNumber'
2661
+ xfa_attribute 'name'
2662
+ xfa_attribute 'numbered'
2663
+ xfa_attribute 'oddOrEven'
2664
+ xfa_attribute 'pagePosition'
2665
+ xfa_attribute 'relevant'
2666
+ xfa_attribute 'use'
2667
+ xfa_attribute 'usehref'
2668
+
2669
+ xfa_node 'desc', Template::Desc, 0..1
2670
+ xfa_node 'extras', Template::Extras, 0..1
2671
+ xfa_node 'medium', Template::Medium, 0..1
2672
+ xfa_node 'occur', Template::Occur, 0..1
2673
+
2674
+ xfa_node 'area', Template::Area
2675
+ xfa_node 'contentArea', Template::ContentArea
2676
+ xfa_node 'draw', Template::Draw
2677
+ xfa_node 'exclGroup', Template::ExclGroup
2678
+ xfa_node 'field', Template::Field
2679
+ xfa_node 'subform', Template::Subform
2680
+
2681
+ def initialize
2682
+ super('pageArea')
2683
+ end
2684
+ end
2685
+
2686
+ class PageSet < XFA::Element
2687
+ xfa_attribute 'id'
2688
+ xfa_attribute 'name'
2689
+ xfa_attribute 'relation'
2690
+ xfa_attribute 'relevant'
2691
+ xfa_attribute 'use'
2692
+ xfa_attribute 'usehref'
2693
+
2694
+ xfa_node 'extras', Template::Extras, 0..1
2695
+ xfa_node 'occur', Template::Occur, 0..1
2696
+
2697
+ xfa_node 'pageArea', Template::PageArea
2698
+ xfa_node 'pageSet', Template::PageSet
2699
+
2700
+ ORDERED_OCCURENCE = "orderedOccurence"
2701
+ DUPLEX_PAGINATED = "duplexPaginated"
2702
+ SIMPLEX_PAGINATED = "simplexPaginated"
2703
+
2704
+ def initialize
2705
+ super('pageSet')
2706
+ end
2707
+ end
2708
+
2709
+ class Variables < XFA::Element
2710
+ xfa_attribute 'id'
2711
+ xfa_attribute 'use'
2712
+ xfa_attribute 'usehref'
2713
+
2714
+ xfa_node 'boolean', Template::Boolean
2715
+ xfa_node 'date', Template::Date
2716
+ xfa_node 'dateTime', Template::DateTime
2717
+ xfa_node 'decimal', Template::Decimal
2718
+ xfa_node 'exData', Template::ExData
2719
+ xfa_node 'float', Template::Float
2720
+ xfa_node 'image', Template::Image
2721
+ xfa_node 'integer', Template::Integer
2722
+ xfa_node 'manifest', Template::Manifest
2723
+ xfa_node 'script', Template::Script
2724
+ xfa_node 'text', Template::Text
2725
+ xfa_node 'time', Template::Time
2726
+
2727
+ def initialize
2728
+ super('variables')
2729
+ end
2730
+ end
2731
+
2732
+ class ExObject < XFA::Element
2733
+ xfa_attribute 'archive'
2734
+ xfa_attribute 'classId'
2735
+ xfa_attribute 'codeBase'
2736
+ xfa_attribute 'codeType'
2737
+ xfa_attribute 'id'
2738
+ xfa_attribute 'name'
2739
+ xfa_attribute 'use'
2740
+ xfa_attribute 'usehref'
2741
+
2742
+ xfa_node 'extras', Template::Extras, 0..1
2743
+
2744
+ xfa_node 'boolean', Template::Boolean
2745
+ xfa_node 'date', Template::Date
2746
+ xfa_node 'dateTime', Template::DateTime
2747
+ xfa_node 'decimal', Template::Decimal
2748
+ xfa_node 'exData', Template::ExData
2749
+ xfa_node 'exObject', Template::ExObject
2750
+ xfa_node 'float', Template::Float
2751
+ xfa_node 'image', Template::Image
2752
+ xfa_node 'integer', Template::Integer
2753
+ xfa_node 'text', Template::Text
2754
+ xfa_node 'time', Template::Time
2755
+
2756
+ def initialize
2757
+ super('exObject')
2758
+ end
2759
+ end
2760
+
2761
+ class Proto < XFA::Element
2762
+ xfa_node 'appearanceFilter', Template::AppearanceFilter
2763
+ xfa_node 'arc', Template::Arc
2764
+ xfa_node 'area', Template::Area
2765
+ xfa_node 'assist', Template::Assist
2766
+ xfa_node 'barcode', Template::Barcode
2767
+ xfa_node 'bindItems', Template::BindItems
2768
+ xfa_node 'bookend', Template::Bookend
2769
+ xfa_node 'boolean', Template::Boolean
2770
+ xfa_node 'border', Template::Border
2771
+ xfa_node 'break', Template::Break
2772
+ xfa_node 'breakAfter', Template::BreakAfter
2773
+ xfa_node 'breakBefore', Template::BreakBefore
2774
+ xfa_node 'button', Template::Button
2775
+ xfa_node 'calculate', Template::Calculate
2776
+ xfa_node 'caption', Template::Caption
2777
+ xfa_node 'certificate', Template::Certificate
2778
+ xfa_node 'certificates', Template::Certificates
2779
+ xfa_node 'checkButton', Template::CheckButton
2780
+ xfa_node 'choiceList', Template::ChoiceList
2781
+ xfa_node 'color', Template::Color
2782
+ xfa_node 'comb', Template::Comb
2783
+ xfa_node 'connect', Template::Connect
2784
+ xfa_node 'contentArea', Template::ContentArea
2785
+ xfa_node 'corner', Template::Corner
2786
+ xfa_node 'date', Template::Date
2787
+ xfa_node 'dateTime', Template::DateTime
2788
+ xfa_node 'dateTimeEdit', Template::DateTimeEdit
2789
+ xfa_node 'decimal', Template::Decimal
2790
+ xfa_node 'defaultUi', Template::DefaultUI
2791
+ xfa_node 'desc', Template::Desc
2792
+ xfa_node 'digestMethod', Template::DigestMethod
2793
+ xfa_node 'digestMethods', Template::DigestMethods
2794
+ xfa_node 'draw', Template::Draw
2795
+ xfa_node 'edge', Template::Edge
2796
+ xfa_node 'encoding', Template::Encoding
2797
+ xfa_node 'encodings', Template::Encodings
2798
+ xfa_node 'encrypt', Template::Encrypt
2799
+ xfa_node 'event', Template::Event
2800
+ xfa_node 'exData', Template::ExData
2801
+ xfa_node 'exObject', Template::ExObject
2802
+ xfa_node 'exclGroup', Template::ExclGroup
2803
+ xfa_node 'execute', Template::Execute
2804
+ xfa_node 'extras', Template::Extras
2805
+ xfa_node 'field', Template::Field
2806
+ xfa_node 'fill', Template::Fill
2807
+ xfa_node 'filter', Template::Filter
2808
+ xfa_node 'float', Template::Float
2809
+ xfa_node 'font', Template::Font
2810
+ xfa_node 'format', Template::Format
2811
+ xfa_node 'handler', Template::Handler
2812
+ xfa_node 'hyphenation', Template::Hyphenation
2813
+ xfa_node 'image', Template::Image
2814
+ xfa_node 'imageEdit', Template::ImageEdit
2815
+ xfa_node 'integer', Template::Integer
2816
+ xfa_node 'issuers', Template::Issuers
2817
+ xfa_node 'items', Template::Items
2818
+ xfa_node 'keep', Template::Keep
2819
+ xfa_node 'keyUsage', Template::KeyUsage
2820
+ xfa_node 'line', Template::Line
2821
+ xfa_node 'linear', Template::Linear
2822
+ xfa_node 'lockDocument', Template::LockDocument
2823
+ xfa_node 'manifest', Template::Manifest
2824
+ xfa_node 'margin', Template::Margin
2825
+ xfa_node 'mdp', Template::MDP
2826
+ xfa_node 'medium', Template::Medium
2827
+ xfa_node 'message', Template::Message
2828
+ xfa_node 'numericEdit', Template::NumericEdit
2829
+ xfa_node 'occur', Template::Occur
2830
+ xfa_node 'oid', Template::OID
2831
+ xfa_node 'oids', Template::OIDs
2832
+ xfa_node 'overflow', Template::Overflow
2833
+ xfa_node 'pageArea', Template::PageArea
2834
+ xfa_node 'pageSet', Template::PageSet
2835
+ xfa_node 'para', Template::Para
2836
+ xfa_node 'passwordEdit', Template::PasswordEdit
2837
+ xfa_node 'pattern', Template::Pattern
2838
+ xfa_node 'picture', Template::Picture
2839
+ xfa_node 'radial', Template::Radial
2840
+ xfa_node 'reason', Template::Reason
2841
+ xfa_node 'reasons', Template::Reasons
2842
+ xfa_node 'rectangle', Template::Rectangle
2843
+ xfa_node 'ref', Template::Ref
2844
+ xfa_node 'script', Template::Script
2845
+ xfa_node 'setProperty', Template::SetProperty
2846
+ xfa_node 'signData', Template::SignData
2847
+ xfa_node 'signature', Template::Signature
2848
+ xfa_node 'signing', Template::Signing
2849
+ xfa_node 'solid', Template::Solid
2850
+ xfa_node 'speak', Template::Speak
2851
+ xfa_node 'stipple', Template::Stipple
2852
+ xfa_node 'subform', Template::Subform
2853
+ xfa_node 'subformSet', Template::SubformSet
2854
+ xfa_node 'subjectDN', Template::SubjectDN
2855
+ xfa_node 'subjectDNs', Template::SubjectDNs
2856
+ xfa_node 'submit', Template::Submit
2857
+ xfa_node 'text', Template::Text
2858
+ xfa_node 'textEdit', Template::TextEdit
2859
+ xfa_node 'time', Template::Time
2860
+ xfa_node 'timeStamp', Template::TimeStamp
2861
+ xfa_node 'toolTip', Template::ToolTip
2862
+ xfa_node 'traversal', Template::Traversal
2863
+ xfa_node 'traverse', Template::Traverse
2864
+ xfa_node 'ui', Template::UI
2865
+ xfa_node 'validate', Template::Validate
2866
+ xfa_node 'value', Template::Value
2867
+ xfa_node 'variables', Template::Variables
2868
+
2869
+ def initialize
2870
+ super('proto')
2871
+ end
2872
+ end
2873
+
2874
+ class Subform < XFA::Element
2875
+ xfa_attribute 'access'
2876
+ xfa_attribute 'allowMacro'
2877
+ xfa_attribute 'anchorType'
2878
+ xfa_attribute 'colSpan'
2879
+ xfa_attribute 'columnWidths'
2880
+ xfa_attribute 'h'
2881
+ xfa_attribute 'id'
2882
+ xfa_attribute 'layout'
2883
+ xfa_attribute 'locale'
2884
+ xfa_attribute 'maxH'
2885
+ xfa_attribute 'maxW'
2886
+ xfa_attribute 'minH'
2887
+ xfa_attribute 'minW'
2888
+ xfa_attribute 'name'
2889
+ xfa_attribute 'presence'
2890
+ xfa_attribute 'relevant'
2891
+ xfa_attribute 'restoreState'
2892
+ xfa_attribute 'scope'
2893
+ xfa_attribute 'use'
2894
+ xfa_attribute 'usehref'
2895
+ xfa_attribute 'w'
2896
+ xfa_attribute 'x'
2897
+ xfa_attribute 'y'
2898
+
2899
+ xfa_node 'assist', Template::Assist, 0..1
2900
+ xfa_node 'bind', Template::Bind, 0..1
2901
+ xfa_node 'bookend', Template::Bookend, 0..1
2902
+ xfa_node 'border', Template::Border, 0..1
2903
+ xfa_node 'break', Template::Break, 0..1
2904
+ xfa_node 'calculate', Template::Calculate, 0..1
2905
+ xfa_node 'desc', Template::Desc, 0..1
2906
+ xfa_node 'extras', Template::Extras, 0..1
2907
+ xfa_node 'keep', Template::Keep, 0..1
2908
+ xfa_node 'margin', Template::Margin, 0..1
2909
+ xfa_node 'occur', Template::Occur, 0..1
2910
+ xfa_node 'overflow', Template::Overflow, 0..1
2911
+ xfa_node 'pageSet', Template::PageSet, 0..1
2912
+ xfa_node 'para', Template::Para, 0..1
2913
+ xfa_node 'traversal', Template::Traversal, 0..1
2914
+ xfa_node 'validate', Template::Validate, 0..1
2915
+ xfa_node 'variables', Template::Variables, 0..1
2916
+
2917
+ xfa_node 'area', Template::Area
2918
+ xfa_node 'breakAfter', Template::BreakAfter
2919
+ xfa_node 'breakBefore', Template::BreakBefore
2920
+ xfa_node 'connect', Template::Connect
2921
+ xfa_node 'draw', Template::Draw
2922
+ xfa_node 'event', Template::Event
2923
+ xfa_node 'exObject', Template::ExObject
2924
+ xfa_node 'exclGroup', Template::ExclGroup
2925
+ xfa_node 'field', Template::Field
2926
+ xfa_node 'proto', Template::Proto
2927
+ xfa_node 'setProperty', Template::SetProperty
2928
+ xfa_node 'subform', Template::Subform
2929
+ xfa_node 'subformSet', Template::SubformSet
2930
+
2931
+ def initialize
2932
+ super('subform')
2933
+ end
2934
+ end
2935
+
2936
+ xfa_attribute 'baseProfile'
2937
+ xfa_node 'extras', Template::Extras, 0..1
2938
+
2939
+ xfa_node 'subform', Template::Subform
2940
+
2941
+ def initialize
2942
+ super("template")
2943
+
2944
+ add_attribute 'xmlns:xfa', 'http://www.xfa.org/schema/xfa-template/3.0/'
2945
+ end
2946
+ end
2947
+
2948
+ #
2949
+ # The _xdc_ packet encloses application-specific XFA driver configuration instruction.
2950
+ #
2951
+ class XDC < XFA::Element
2952
+ mime_type ''
2953
+
2954
+ def initialize
2955
+ super("xsl:xdc")
2956
+
2957
+ add_attribute 'xmlns:xdc', 'http://www.xfa.org/schema/xdc/1.0/'
2958
+ end
2959
+ end
2960
+
2961
+ #
2962
+ # The _xfdf_ (annotations) packet enclosed collaboration annotations placed upon a PDF document.
2963
+ #
2964
+ class XFDF < XFA::Element
2965
+ mime_type 'application/vnd.adobe.xfdf'
2966
+
2967
+ def initialize
2968
+ super("xfdf")
2969
+
2970
+ add_attribute 'xmlns', 'http://ns.adobe.com/xfdf/'
2971
+ add_attribute 'xml:space', 'preserve'
2972
+ end
2973
+ end
2974
+
2975
+ #
2976
+ # An _XMP_ packet contains XML representation of PDF metadata.
2977
+ #
2978
+ class XMPMeta < XFA::Element
2979
+ mime_type 'application/rdf+xml'
2980
+
2981
+ def initialize
2982
+ super("xmpmeta")
2983
+
2984
+ add_attribute 'xmlns', 'http://ns.adobe.com/xmpmeta/'
2985
+ add_attribute 'xml:space', 'preserve'
2986
+ end
2987
+ end
2988
+
2989
+ end
2990
+
2991
+ class XDP < XFA::Element
2992
+ xfa_attribute 'uuid'
2993
+ xfa_attribute 'timeStamp'
2994
+
2995
+ xfa_node 'config', Origami::XDP::Packet::Config, 0..1
2996
+ xfa_node 'connectionSet', Origami::XDP::Packet::ConnectionSet, 0..1
2997
+ xfa_node 'datasets', Origami::XDP::Packet::Datasets, 0..1
2998
+ xfa_node 'localeSet', Origami::XDP::Packet::LocaleSet, 0..1
2999
+ xfa_node 'pdf', Origami::XDP::Packet::PDF, 0..1
3000
+ xfa_node 'sourceSet', Origami::XDP::Packet::SourceSet, 0..1
3001
+ xfa_node 'styleSheet', Origami::XDP::Packet::StyleSheet, 0..1
3002
+ xfa_node 'template', Origami::XDP::Packet::Template, 0..1
3003
+ xfa_node 'xdc', Origami::XDP::Packet::XDC, 0..1
3004
+ xfa_node 'xfdf', Origami::XDP::Packet::XFDF, 0..1
3005
+ xfa_node 'xmpmeta', Origami::XDP::Packet::XMPMeta, 0..1
3006
+
3007
+ def initialize
3008
+ super('xdp:xdp')
3009
+
3010
+ add_attribute 'xmlns:xdp', 'http://ns.adobe.com/xdp/'
3011
+ end
3012
+ end
3013
+
3014
+ class Package < REXML::Document
3015
+
3016
+ def initialize(package = nil)
3017
+ super(package || REXML::XMLDecl.new.to_s)
3018
+
3019
+ add_element Origami::XDP::XDP.new if package.nil?
3020
+ end
3021
+
3022
+ end
3023
+
3024
+ end
3025
+
3026
+ end
3027
+