rgen 0.5.4 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/CHANGELOG +28 -0
  2. data/Rakefile +3 -4
  3. data/lib/ea_support/uml13_ea_metamodel.rb +3 -3
  4. data/lib/ea_support/uml13_ea_to_uml13.rb +33 -2
  5. data/lib/ea_support/uml13_to_uml13_ea.rb +7 -0
  6. data/lib/mmgen/mm_ext/ecore_mmgen_ext.rb +4 -4
  7. data/lib/mmgen/templates/metamodel_generator.tpl +143 -143
  8. data/lib/rgen/ecore/ecore.rb +11 -1
  9. data/lib/rgen/ecore/ecore_interface.rb +47 -0
  10. data/lib/rgen/ecore/ecore_to_ruby.rb +166 -0
  11. data/lib/rgen/ecore/{ecore_transformer.rb → ruby_to_ecore.rb} +11 -11
  12. data/lib/rgen/environment.rb +15 -2
  13. data/lib/rgen/fragment/dump_file_cache.rb +63 -0
  14. data/lib/rgen/fragment/fragmented_model.rb +139 -0
  15. data/lib/rgen/fragment/model_fragment.rb +268 -0
  16. data/lib/rgen/instantiator/abstract_xml_instantiator.rb +44 -72
  17. data/lib/rgen/instantiator/default_xml_instantiator.rb +2 -2
  18. data/lib/rgen/instantiator/ecore_xml_instantiator.rb +16 -1
  19. data/lib/rgen/instantiator/json_instantiator.rb +16 -2
  20. data/lib/rgen/instantiator/nodebased_xml_instantiator.rb +118 -138
  21. data/lib/rgen/instantiator/qualified_name_resolver.rb +5 -1
  22. data/lib/rgen/instantiator/reference_resolver.rb +126 -24
  23. data/lib/rgen/instantiator/xmi11_instantiator.rb +6 -2
  24. data/lib/rgen/metamodel_builder.rb +18 -6
  25. data/lib/rgen/metamodel_builder/builder_extensions.rb +431 -407
  26. data/lib/rgen/metamodel_builder/builder_runtime.rb +8 -8
  27. data/lib/rgen/metamodel_builder/constant_order_helper.rb +4 -4
  28. data/lib/rgen/metamodel_builder/data_types.rb +5 -1
  29. data/lib/rgen/metamodel_builder/intermediate/feature.rb +167 -0
  30. data/lib/rgen/metamodel_builder/module_extension.rb +2 -2
  31. data/lib/rgen/model_builder.rb +10 -5
  32. data/lib/rgen/model_builder/builder_context.rb +17 -1
  33. data/lib/rgen/serializer/opposite_reference_filter.rb +18 -0
  34. data/lib/rgen/serializer/qualified_name_provider.rb +45 -0
  35. data/lib/rgen/template_language/template_container.rb +3 -1
  36. data/lib/rgen/{auto_class_creator.rb → util/auto_class_creator.rb} +6 -1
  37. data/lib/rgen/util/cached_glob.rb +67 -0
  38. data/lib/rgen/util/file_cache_map.rb +104 -0
  39. data/lib/rgen/util/file_change_detector.rb +78 -0
  40. data/lib/rgen/{method_delegation.rb → util/method_delegation.rb} +18 -3
  41. data/lib/rgen/{model_comparator.rb → util/model_comparator.rb} +17 -5
  42. data/lib/rgen/{model_comparator_base.rb → util/model_comparator_base.rb} +6 -1
  43. data/lib/rgen/{model_dumper.rb → util/model_dumper.rb} +6 -1
  44. data/lib/rgen/{name_helper.rb → util/name_helper.rb} +6 -1
  45. data/lib/rgen/util/pattern_matcher.rb +329 -0
  46. data/lib/transformers/uml13_to_ecore.rb +103 -60
  47. data/test/ecore_self_test.rb +43 -42
  48. data/test/json_test.rb +15 -0
  49. data/test/metamodel_builder_test.rb +361 -206
  50. data/test/metamodel_from_ecore_test.rb +45 -0
  51. data/test/metamodel_order_test.rb +10 -4
  52. data/test/metamodel_roundtrip_test.rb +2 -2
  53. data/test/metamodel_roundtrip_test/TestModel_Regenerated.rb +1 -1
  54. data/test/metamodel_roundtrip_test/houseMetamodel_Regenerated.ecore +50 -50
  55. data/test/method_delegation_test.rb +9 -9
  56. data/test/model_builder/ecore_internal.rb +19 -9
  57. data/test/model_builder/serializer_test.rb +1 -1
  58. data/test/reference_resolver_test.rb +79 -12
  59. data/test/rgen_test.rb +2 -0
  60. data/test/template_language_test.rb +7 -0
  61. data/test/template_language_test/templates/callback_indent_test/a.tpl +12 -0
  62. data/test/template_language_test/templates/callback_indent_test/b.tpl +5 -0
  63. data/test/testmodel/ea_testmodel_regenerated.xml +588 -583
  64. data/test/transformer_test.rb +3 -3
  65. data/test/util/file_cache_map_test.rb +91 -0
  66. data/test/util/file_cache_map_test/testdir/fileA +1 -0
  67. data/test/util_test.rb +4 -0
  68. data/test/xml_instantiator_test.rb +139 -135
  69. metadata +49 -104
  70. data/lib/rgen/ecore/ecore_instantiator.rb +0 -31
  71. data/lib/rgen/metamodel_builder/metamodel_description.rb +0 -232
  72. data/redist/xmlscan/ChangeLog +0 -1301
  73. data/redist/xmlscan/README +0 -34
  74. data/redist/xmlscan/THANKS +0 -11
  75. data/redist/xmlscan/doc/changes.html +0 -74
  76. data/redist/xmlscan/doc/changes.rd +0 -80
  77. data/redist/xmlscan/doc/en/conformance.html +0 -136
  78. data/redist/xmlscan/doc/en/conformance.rd +0 -152
  79. data/redist/xmlscan/doc/en/manual.html +0 -356
  80. data/redist/xmlscan/doc/en/manual.rd +0 -402
  81. data/redist/xmlscan/doc/ja/conformance.ja.html +0 -118
  82. data/redist/xmlscan/doc/ja/conformance.ja.rd +0 -134
  83. data/redist/xmlscan/doc/ja/manual.ja.html +0 -325
  84. data/redist/xmlscan/doc/ja/manual.ja.rd +0 -370
  85. data/redist/xmlscan/doc/src/Makefile +0 -41
  86. data/redist/xmlscan/doc/src/conformance.rd.src +0 -256
  87. data/redist/xmlscan/doc/src/langsplit.rb +0 -110
  88. data/redist/xmlscan/doc/src/manual.rd.src +0 -614
  89. data/redist/xmlscan/install.rb +0 -41
  90. data/redist/xmlscan/lib/xmlscan/encoding.rb +0 -311
  91. data/redist/xmlscan/lib/xmlscan/htmlscan.rb +0 -289
  92. data/redist/xmlscan/lib/xmlscan/namespace.rb +0 -352
  93. data/redist/xmlscan/lib/xmlscan/parser.rb +0 -299
  94. data/redist/xmlscan/lib/xmlscan/scanner.rb +0 -1109
  95. data/redist/xmlscan/lib/xmlscan/version.rb +0 -22
  96. data/redist/xmlscan/lib/xmlscan/visitor.rb +0 -158
  97. data/redist/xmlscan/lib/xmlscan/xmlchar.rb +0 -441
  98. data/redist/xmlscan/memo/CONFORMANCE +0 -1249
  99. data/redist/xmlscan/memo/PRODUCTIONS +0 -195
  100. data/redist/xmlscan/memo/contentspec.ry +0 -335
  101. data/redist/xmlscan/samples/chibixml.rb +0 -105
  102. data/redist/xmlscan/samples/getxmlchar.rb +0 -122
  103. data/redist/xmlscan/samples/rexml.rb +0 -159
  104. data/redist/xmlscan/samples/xmlbench.rb +0 -88
  105. data/redist/xmlscan/samples/xmlbench/parser/chibixml.rb +0 -22
  106. data/redist/xmlscan/samples/xmlbench/parser/nqxml.rb +0 -29
  107. data/redist/xmlscan/samples/xmlbench/parser/rexml.rb +0 -62
  108. data/redist/xmlscan/samples/xmlbench/parser/xmlparser.rb +0 -22
  109. data/redist/xmlscan/samples/xmlbench/parser/xmlscan-0.0.10.rb +0 -62
  110. data/redist/xmlscan/samples/xmlbench/parser/xmlscan-chibixml.rb +0 -22
  111. data/redist/xmlscan/samples/xmlbench/parser/xmlscan-rexml.rb +0 -22
  112. data/redist/xmlscan/samples/xmlbench/parser/xmlscan.rb +0 -99
  113. data/redist/xmlscan/samples/xmlbench/xmlbench-lib.rb +0 -116
  114. data/redist/xmlscan/samples/xmlconftest.rb +0 -200
  115. data/redist/xmlscan/test.rb +0 -7
  116. data/redist/xmlscan/tests/deftestcase.rb +0 -73
  117. data/redist/xmlscan/tests/runtest.rb +0 -47
  118. data/redist/xmlscan/tests/testall.rb +0 -14
  119. data/redist/xmlscan/tests/testencoding.rb +0 -438
  120. data/redist/xmlscan/tests/testhtmlscan.rb +0 -752
  121. data/redist/xmlscan/tests/testnamespace.rb +0 -457
  122. data/redist/xmlscan/tests/testparser.rb +0 -591
  123. data/redist/xmlscan/tests/testscanner.rb +0 -1749
  124. data/redist/xmlscan/tests/testxmlchar.rb +0 -143
  125. data/redist/xmlscan/tests/visitor.rb +0 -34
@@ -1,370 +0,0 @@
1
- =begin
2
- # $Id: manual.rd.src,v 1.1 2003/01/22 16:41:45 katsu Exp $
3
-
4
- = xmlscan version 0.2 ��ե���󥹥ޥ˥奢��
5
-
6
- == ����
7
-
8
- xmlscan �� Ruby �����ǽ񤫤줿 non-validating XML parser �Ǥ���
9
-
10
- ���Τ褦����Ĺ������ޤ���
11
-
12
- : 100% pure Ruby
13
- ��ĥ�饤�֥������ɬ�פȤ��ʤ��Τǡ�1.6 �ʾ�� Ruby ���󥿥ץ꥿����
14
- ����д�����ư��ޤ���(ɸ��ź�դγ�ĥ�饤�֥���ɬ�פȤ��ޤ���)
15
-
16
- : ���ʤؤ�Ŭ����
17
- xmlscan �ϡ�XML 1.0 Specification �ǽҤ٤��Ƥ��롢�������򸡾ڤ��ʤ�
18
- �ץ������˵��������Ƥξ������������Ȥ���ɸ�˳�ȯ���ʤ����
19
- ���ޤ���
20
-
21
- : ��®
22
- xmlscan �β��Ϥ�®���ϡ������餯����¸���� Ruby �ǽ񤫤줿
23
- XML/HTML parser ����Ǻ�®�Ǥ���
24
-
25
- : �͡���CES���б�
26
- xmlscan �Ͼ��ʤ��Ȥ� iso-8859-*, EUC-*, Shift_JIS, UTF-8 �ǽ񤫤줿
27
- XMLʸ��򤽤Τޤ޲��ϤǤ��ޤ��������� UTF-16 �ϰ����ޤ���
28
-
29
- : ���Ϥ������
30
- xmlscan �����ϡ�����XMLʸ�����Ϥ��뤳�Ȥ����Ǥ���XMLʸ���
31
- ���ؤ˼�갷������ι��٥�ʵ�ǽ���󶡤��ޤ���xmlscan ��
32
- ���Τ褦�ʵ�ǽ���󶡤���饤�֥��Υ�����ʬ�Ȥ��ƻȤ��뤳�Ȥ�
33
- ���ꤷ�Ƥ��ޤ���
34
-
35
- : HTML
36
- ���ޥ��� HTML ��ʸ���Ϥ��� htmlscan ���դ��Ƥ��ޤ���
37
-
38
-
39
- == ʸ�����󥳡��ǥ��󥰤ˤĤ���
40
-
41
- �ǥե���ȤǤϡ�xmlscan ���ɤ� CES (Character Encoding Scheme) ��
42
- XMLʸ�����Ϥ��뤫�ϥ������Х��ѿ� $KCODE ���ͤˤ�äƷ�ޤ�ޤ���
43
- EUC-*, Shift_JIS, UTF-8 �ǽ񤫤줿XMLʸ�����Ϥ���ˤ� $KCODE ��
44
- ((<XMLScan::XMLScanner#kcode=>)) ��Ŭ�ڤ��ͤ����ꤹ��ɬ�פ�����ޤ���
45
-
46
- UTF-16 ��ľ�ܥ��ݡ��Ȥ��Ƥ��ޤ��󡣲������˰�ö UTF-8 ���Ѵ�����
47
- ɬ�פ�����ޤ���
48
-
49
-
50
- == XML̾�����֤ˤĤ���
51
-
52
- XML̾�����֤� xmlscan/namespace.rb �Ǽ�������Ƥ��ޤ��������󥿡��ե�������
53
- �礭���ѹ�����ͽ�꤬���뤿�� undocumented �Ȥ��ޤ���
54
-
55
-
56
-
57
- == ���饹��ե����
58
-
59
-
60
- === XMLScan::Error
61
-
62
- xmlscan �˴ؤ������Ƥ��㳰�Υ����ѡ����饹��
63
-
64
- �������㳰�ϡ�XMLScan::Visitor �Υ��󥹥��󥹤���XMLScan::XMLScanner ��
65
- XMLScan::XMLParser ���饨�顼���������ä��Ȥ��ˡ��ǥե���Ȥ�ȯ��������
66
- ��ΤǤ����ƥѡ�����ľ�ܤ������㳰���ꤲ�뤳�ȤϤ���ޤ���
67
-
68
- #�����㳰�� xmlscan/scanner.rb ���������Ƥ��ޤ���
69
-
70
- : XMLScan::ParseError
71
-
72
- ������§�˥ޥå����ʤ����������ȿ�ʳ��Υ��顼��
73
-
74
- : XMLScan::NotWellFormedError
75
-
76
- ����������˰�ȿ���Ƥ��롣
77
-
78
- : XMLScan::NotValidError
79
-
80
- ����������˰�ȿ���Ƥ��롣
81
-
82
-
83
- === XMLScan::Visitor
84
-
85
- XMLʸ��β��Ϸ�̤������뤿��� Mix-in �Ǥ���
86
-
87
- xmlscan �˴ޤޤ��� parser �ϡ�ʸ�����Ƭ���鹽ʸ���Ϥ�Ԥ�����������
88
- ��ʸ���Ǥ򸫤Ĥ��뤿�Ӥˡ��ѡ�����Ϳ����줿 XMLScan::Visitor ��
89
- ���󥹥��󥹤�����Υ᥽�åɤ�ƤӽФ��ޤ������θƤӽФ��ϡ�ɬ��ʸ���
90
- ��Ƭ������֤˹Ԥ��ޤ���
91
-
92
- ==== �᥽�å�:
93
-
94
- �ä˵��Ҥ�̵���¤ꡢ�ƥ᥽�åɤϥǥե���ȤǤϲ��⤷�ޤ���
95
-
96
- --- XMLScan::Visitor#parse_error(msg)
97
-
98
- ������§�˥ޥå����ʤ����������ȿ�ʳ��Υ��顼��ȯ����������
99
- �ƤӽФ���ޤ����ǥե���ȤǤ� ((<XMLScan::ParseError>))�㳰��
100
- ȯ�������ޤ����㳰�����������æ�Ф�Ԥ鷺�����̤������
101
- �ѡ������֤��ȡ��ѡ����ϥ��顼��������Ʋ��Ϥ�³���ޤ���
102
-
103
- --- XMLScan::Visitor#wellformed_error(msg)
104
-
105
- �����������ȿ��ȯ���������˸ƤӽФ���ޤ����ǥե���ȤǤ�
106
- ((<XMLScan::NotWellFormedError>))�㳰��ȯ�������ޤ����㳰��������
107
- ���æ�Ф�Ԥ鷺�����̤������ѡ������֤��ȡ��ѡ����ϥ��顼��
108
- �������Ʋ��Ϥ�³���ޤ���
109
-
110
- --- XMLScan::Visitor#valid_error(msg)
111
-
112
- �����������ȿ��ȯ���������˸ƤӽФ���ޤ����ǥե���ȤǤ�
113
- ((<XMLScan::NotValidError>))�㳰��ȯ�������ޤ����㳰��������
114
- ���æ�Ф�Ԥ鷺�����̤������ѡ������֤��ȡ��ѡ����ϥ��顼��
115
- �������Ʋ��Ϥ�³���ޤ���
116
-
117
- �ʤ������ߤ� xmlscan �ˤ��������򸡾ڤ���XML�ץ�������
118
- �ޤޤ�Ƥ��ޤ��󡣤��Υ᥽�åɤϾ�����ǤΤ����ͽ�󤵤�Ƥ��ޤ���
119
-
120
- --- XMLScan::Visitor#warning(msg)
121
-
122
- ���顼�ǤϤʤ����侩����ʤ������䡢xmlscan �ǤϽ�ʬ�˲��ϤǤ��ʤ�
123
- ��ʸ��ȯ���������˸ƤӽФ���ޤ���
124
-
125
- --- XMLScan::Visitor#on_start_document
126
-
127
- XMLʸ��β��Ϥ�Ϥ��ľ���˸ƤӽФ���ޤ������Υ᥽�åɤ��ƤӽФ��줿
128
- ��ˤ�ɬ�����б����� ((<XMLScan::Visitor#on_end_document>)) �᥽�åɤ�
129
- �ƤӽФ���ޤ���
130
-
131
- --- XMLScan::Visitor#on_end_document
132
-
133
- XMLʸ��ν�ü�ޤDz��Ϥ����ä���˸ƤӽФ���ޤ���
134
-
135
- --- XMLScan::Visitor#on_xmldecl
136
- --- XMLScan::Visitor#on_xmldecl_version(str)
137
- --- XMLScan::Visitor#on_xmldecl_encoding(str)
138
- --- XMLScan::Visitor#on_xmldecl_standalone(str)
139
- --- XMLScan::Visitor#on_xmldecl_other(name, value)
140
- --- XMLScan::Visitor#on_xmldecl_end
141
-
142
- XML�����ȯ���������˸ƤӽФ���ޤ���
143
-
144
- <?xml version="1.0" encoding="euc-jp" standalone="yes" ?>
145
- ^ ^ ^ ^ ^
146
- 1 2 3 4 5
147
-
148
- method argument
149
- --------------------------------------
150
- 1: on_xmldecl
151
- 2: on_xmldecl_version ("1.0")
152
- 3: on_xmldecl_encoding ("euc-jp")
153
- 4: on_xmldecl_standalone ("yes")
154
- 5: on_xmldecl_end
155
-
156
- XML�����ȯ��������硢on_xmldecl �� on_xmldecl_end ��ɬ��
157
- �ƤӽФ���ޤ���¾�Υ᥽�åɤ��б����빽ʸ��XML������
158
- ����ʤ��ä����ϸƤӽФ���ޤ���
159
-
160
- on_xmldecl_other �� version, encoding, standalone �ʳ��������
161
- XML�������ˤ��ä����˸ƤӽФ���ޤ������Τ褦������Ϲ�ʸ��
162
- ������Ƥ��ʤ����ᡢon_xmldecl_other ���ƤӽФ�������ˤ�ɬ��
163
- ((<XMLScan::Visitor#parse_error>)) �᥽�åɤ��ƤӽФ���뤳�Ȥ�
164
- ���դ��Ʋ�������
165
-
166
- --- XMLScan::Visitor#on_doctype(root, pubid, sysid)
167
-
168
- ʸ�������ȯ���������˸ƤӽФ���ޤ���
169
-
170
- document argument
171
- --------------------------------------------------------------
172
- 1: <!DOCTYPE foo> ('foo', nil, nil)
173
- 2: <!DOCTYPE foo SYSTEM "bar"> ('foo', nil, 'bar')
174
- 3: <!DOCTYPE foo PUBLIC "bar"> ('foo', 'bar', nil )
175
- 4: <!DOCTYPE foo PUBLIC "bar" "baz"> ('foo', 'bar', 'baz')
176
-
177
- --- XMLScan::Visitor#on_prolog_space(str)
178
-
179
- ���񤭤���˶����ȯ���������˸ƤӽФ���ޤ���
180
-
181
- --- XMLScan::Visitor#on_comment(str)
182
-
183
- �����Ȥ�ȯ���������˸ƤӽФ���ޤ���
184
-
185
- --- XMLScan::Visitor#on_pi(target, pi)
186
-
187
- ����̿���ȯ���������˸ƤӽФ���ޤ���
188
-
189
- --- XMLScan::Visitor#on_chardata(str)
190
-
191
- ʸ���ǡ�����ȯ���������˸ƤӽФ���ޤ���
192
-
193
- --- XMLScan::Visitor#on_cdata(str)
194
-
195
- CDATA����������ȯ���������˸ƤӽФ���ޤ���
196
-
197
- --- XMLScan::Visitor#on_entityref(ref)
198
-
199
- °���ͤ���ʳ��ξ��ǰ��̼��λ��Ȥ�ȯ���������˸ƤӽФ���ޤ���
200
-
201
- --- XMLScan::Visitor#on_charref(code)
202
- --- XMLScan::Visitor#on_charref_hex(code)
203
-
204
- °���ͤ���ʳ��ξ���ʸ�����Ȥ�ȯ���������˸ƤӽФ���ޤ���
205
- ʸ�������ɤ�10�ʿ��ǻ��ꤵ��Ƥ������� on_charref��16�ʿ���
206
- ���ꤵ��Ƥ������� on_charref_hex ���ƤӽФ���ޤ���
207
- ((|code|))�������Ǥ���
208
-
209
- --- XMLScan::Visitor#on_stag(name)
210
- --- XMLScan::Visitor#on_attribute(name)
211
- --- XMLScan::Visitor#on_attr_value(str)
212
- --- XMLScan::Visitor#on_attr_entityref(ref)
213
- --- XMLScan::Visitor#on_attr_charref(code)
214
- --- XMLScan::Visitor#on_attr_charref_hex(code)
215
- --- XMLScan::Visitor#on_attribute_end(name)
216
- --- XMLScan::Visitor#on_stag_end_empty(name)
217
- --- XMLScan::Visitor#on_stag_end(name)
218
-
219
- ���ϥ�����ȯ���������˸ƤӽФ���ޤ���
220
-
221
- <hoge fuga="foo&bar;&#38;&#x26;baz" >
222
- ^ ^ ^ ^ ^ ^ ^ ^ ^
223
- 1 2 3 4 5 6 7 8 9
224
-
225
- method argument
226
- ------------------------------------
227
- 1: on_stag ('hoge')
228
- 2: on_attribute ('fuga')
229
- 3: on_attr_value ('foo')
230
- 4: on_attr_entityref ('bar')
231
- 5: on_attr_charref (38)
232
- 6: on_attr_charref_hex (38)
233
- 7: on_attr_value ('baz')
234
- 8: on_attribute_end ('fuga')
235
- 9: on_stag_end ('hoge')
236
- or
237
- on_stag_end_empty ('hoge')
238
-
239
- ���ϥ�����ȯ��������硢on_stag �ȡ��б����� on_stag_end ����
240
- on_stag_end_empty ��ɬ���ƤӽФ���ޤ���¾�Υ᥽�åɤϡ����ϥ�����
241
- ���°��������ʤ��ä����ϸƤӽФ���ޤ���
242
-
243
- °����ȯ��������硢on_attribute �� on_attribute_end ��ɬ��
244
- �ƤӽФ���ޤ���°���ͤ��� (fuga="") �λ��ϡ�����2�ĤΥ᥽�åɤΤߤ�
245
- �ƤӽФ���ޤ���
246
-
247
- on_attr_entityref ��°���ͤ���ǰ��̼��λ��Ȥ�ȯ����������
248
- �ƤӽФ���ޤ���on_charref �ڤ� on_charref_hex ��°���ͤ����
249
- ʸ�����Ȥ�ȯ���������˸ƤӽФ���ޤ���
250
-
251
- �����������ǥ������ä����ϡ�on_stag_end �᥽�åɤ������
252
- on_stag_end_empty �᥽�åɤ��ƤӽФ���ޤ���
253
-
254
- --- XMLScan::Visitor#on_etag(name)
255
-
256
- ��λ������ȯ���������˸ƤӽФ���ޤ���
257
-
258
-
259
-
260
- === XMLScan::XMLScanner
261
-
262
- XMLʸ��������Ϥ�����������ǧ�����륹����ʤǤ���
263
-
264
- XMLScan::XMLScanner �ε���Ŭ�����ˤĤ��Ƥϡ�¾��ʸ��ǽҤ٤Ƥ��ޤ���
265
-
266
- ==== �����ѡ����饹:
267
-
268
- * Object
269
-
270
- ==== ���饹�᥽�å�:
271
-
272
- --- XMLScan::XMLScanner.new(visitor[, option ...])
273
-
274
- XMLScan::XMLScanner ���֥������Ȥ��������ޤ���((|visitor|))��
275
- XMLScan::Visitor �Υ��󥹥��󥹤ǡ�XMLScan::XMLScanner ���֥������Ȥ���
276
- ���Ϸ�̤�������ޤ���
277
-
278
- ((|option|))��ʸ�������ϥ���ܥ�ǻ��ꤷ�ޤ���option�ˤ�
279
- ���Τ�Τ�����ޤ���
280
-
281
- : 'strict_char'
282
-
283
- (({require 'xmlscan/xmlchar'})) ����Ȼ���Ǥ���褦�ˤʤ�ޤ���
284
- ������ʸ�����Ȥ��Ƥ��ʤ����ɤ����Υ����å���Ԥ��ޤ���
285
- �ѥե����ޥ󥹤��������㲼���ޤ���
286
-
287
- ==== �᥽�å�:
288
-
289
- --- XMLScan::XMLScanner#kcode= arg
290
-
291
- CES����ꤷ�ޤ���((|arg|))�β��ϡ�nil ������� $KCODE ��Ʊ���Ǥ���
292
- ((|arg|))�� nil �ΤȤ��ϡ��ɤ� CES �Dz��Ϥ�Ԥ����� $KCODE ���ͤˤ�ä�
293
- ��ޤ�ޤ���
294
-
295
- --- XMLScan::XMLScanner#kcode
296
-
297
- �ɤ� CES �Dz��Ϥ�Ԥ����� Regexp#kcode ��Ʊ���������֤��ޤ���
298
- nil�ΤȤ���$KCODE�˰�¸���뤳�Ȥ�ɽ���ޤ���
299
-
300
- --- XMLScan::XMLScanner#parse(source)
301
-
302
- ((|source|)) ��XMLʸ��Ȥ��Ʋ��Ϥ��ޤ���((|source|)) ��ʸ����
303
- ʸ������������� IO#gets ��Ʊ�������񤤤򤹤� gets �᥽�åɤ����
304
- ���֥������ȤǤʤ���Фʤ�ޤ���
305
-
306
-
307
- === XMLScan::XMLParser
308
-
309
- �������򸡾ڤ��ʤ� XML parser �Ǥ���
310
-
311
- XMLScan::XMLParser �ε���Ŭ�����ˤĤ��Ƥϡ�¾��ʸ��ǽҤ٤Ƥ��ޤ���
312
-
313
-
314
- ==== �����ѡ����饹:
315
-
316
- * ((<XMLScan::XMLScanner>))
317
-
318
- ==== ���饹�᥽�å�:
319
-
320
- --- XMLScan::XMLParser.new(visitor[, option ...])
321
-
322
- XMLScan::XMLParser ���֥������Ȥ�((|visitor|))�γƥ᥽�åɤˤĤ��ơ�
323
- ���Τ��Ȥ��ݾڤ��ޤ���
324
-
325
- : ((<XMLScan::Visitor#on_stag>))
326
-
327
- ���Υ᥽�åɤ�ƤӽФ�����ˡ��б����� ((<XMLScan::Visitor#on_etag>))
328
- �᥽�åɤ�ɬ���ƤӽФ��ޤ���
329
-
330
- �ä��ơ����顼������Ԥ�ʤ���С���������XMLʸ��Ǥϵ��������ʤ�
331
- �᥽�åɸƤӽФ���������������ޤ���
332
-
333
-
334
- === XMLScan::HTMLScanner
335
-
336
- ((<XMLScan::XMLScanner>)) �򸵤ˤ��� HTML �ѡ����Ǥ���
337
-
338
- XMLScan::HTMLScanner �ε���Ŭ�����ˤĤ��Ƥϡ�¾��ʸ��ǽҤ٤Ƥ��ޤ���
339
-
340
- ==== �����ѡ����饹:
341
-
342
- * ((<XMLScan::XMLScanner>))
343
-
344
- ==== ���饹�᥽�å�:
345
-
346
- --- XMLScan::HTMLScanner.new(visitor[, option ...])
347
-
348
- XMLScan::HTMLScanner ���֥������Ȥ�((|visitor|))�γƥ᥽�åɤˤĤ��ơ�
349
- ���Τ��Ȥ��ݾڤ��ޤ���
350
-
351
- : ((<XMLScan::Visitor#on_xmldecl>))
352
- : ((<XMLScan::Visitor#on_xmldecl_version>))
353
- : ((<XMLScan::Visitor#on_xmldecl_encoding>))
354
- : ((<XMLScan::Visitor#on_xmldecl_standalone>))
355
- : ((<XMLScan::Visitor#on_xmldecl_end>))
356
-
357
- HTML �ˤ� XML�����¸�ߤ��ʤ��Τǡ������Υ᥽�åɤ�ƤӽФ����Ȥ�
358
- ����ޤ���
359
-
360
- : ((<XMLScan::Visitor#on_stag_end_empty>))
361
-
362
- HTML �ˤ϶����ǥ�����¸�ߤ��ʤ��Τǡ����Υ᥽�åɤ�ƤӽФ����Ȥ�
363
- ����ޤ��󡣶����ǥ����ϲ��ϥ��顼�ˤʤ�ޤ���
364
-
365
- : ((<XMLScan::Visitor#wellformed_error>))
366
-
367
- HTML �ˤ�����������¸�ߤ��ʤ��Τǡ����Υ᥽�åɤ�ƤӽФ����Ȥ�
368
- ����ޤ���
369
-
370
- =end
@@ -1,41 +0,0 @@
1
- # Makefile
2
- # $Id: Makefile,v 1.1 2003/01/22 16:42:12 katsu Exp $
3
-
4
- RUBY = ruby
5
- RD2 = rd2
6
- LANGSPLIT = $(RUBY) src/langsplit.rb
7
-
8
- SOURCES = src/manual.rd.src src/conformance.rd.src
9
-
10
- TARGETS_en = $(SOURCES:.rd.src=.rd) $(SOURCES:.rd.src=.html)
11
- TARGETS_ja = $(SOURCES:.rd.src=.ja.rd) $(SOURCES:.rd.src=.ja.html)
12
-
13
- TARGETS = $(subst src/,en/,$(TARGETS_en)) \
14
- $(subst src/,ja/,$(TARGETS_ja)) \
15
- changes.html
16
-
17
- all: $(TARGETS)
18
-
19
- clean:
20
- -rm -f $(TARGETS)
21
-
22
- .SUFFIXES: .html .rd
23
-
24
- .rd.html:
25
- $(RD2) $< > $@
26
-
27
- en/manual.rd: src/manual.rd.src
28
- $(LANGSPLIT) -en $< > $@
29
- ja/manual.ja.rd: src/manual.rd.src
30
- $(LANGSPLIT) -ja $< > $@
31
- en/conformance.rd: src/conformance.rd.src
32
- $(LANGSPLIT) -en $< > $@
33
- ja/conformance.ja.rd: src/conformance.rd.src
34
- $(LANGSPLIT) -ja $< > $@
35
-
36
- en/manual.html: en/manual.rd
37
- ja/manual.ja.html: ja/manual.ja.rd
38
- en/conformance.html: en/conformance.rd
39
- ja/conformance.ja.html: ja/conformance.ja.rd
40
-
41
- changes.html: changes.rd
@@ -1,256 +0,0 @@
1
- =begin
2
- # $Id: conformance.rd.src,v 1.1 2003/01/22 16:41:45 katsu Exp $
3
-
4
- = xmlscan �ε��ʤؤ�Ŭ����
5
-
6
- en| = Conformance of xmlscan to the specifications
7
-
8
- ����ʸ��Ǥϡ�xmlscan �˴ޤޤ��ƥѡ����� XML ��Ϣ���ʤؤ�
9
- Ŭ�����ˤĤ��ƽҤ٤ޤ���
10
-
11
- en| This document describes the conformance of each parser
12
- en| included in xmlscan for XML related specifications.
13
-
14
- == ����
15
-
16
- en| == Abstract
17
-
18
- xmlscan �� XML 1.0 Sepcification ((<[XML]>)) �Ǥ����Ȥ�����
19
- ���������򸡾ڤ��ʤ��ץ������פǤ����������򸡾ڤ��ʤ��ץ�������
20
- ��������ΤۤȤ�ɤ��������Ƥ��ޤ������������Թ�塢���
21
- ���Τ褦�����󤬤���ޤ����ܺ٤ϳƥ��饹��ε��Ҥ򻲾Ȥ��Ƥ���������
22
-
23
- en| XMLscan is one of "non-validating XML processor" according to
24
- en| XML 1.0 Specification ((<[XML]>)). XMLscan is satisfied with
25
- en| almost conditions required for a non-validation XML processor,
26
- en| though, for the limitations of implementations, there are mainly
27
- en| the following restrictions. For detail, See the below
28
- en| descriptions for each class.
29
-
30
- * UTF-16 �ǽ񤫤줿XMLʸ���ľ�ܲ��ϤǤ��ޤ���
31
- * �ǥե���ȤǤϡ�XMLʸ����ǡ����Ϥ���ʸ̮�ǻ��Ѥ�ǧ����ʤ�
32
- ʸ�����ޤޤ�Ƥ��ʤ����Ȥ򸡺����ޤ���
33
- * �����볰�����Τ��ɤ߹��ߤޤ��󡣳��������оݼ��Τ˴ؤ���
34
- ����������ϥ����å�����ޤ���
35
- * ����DTD���֥��åȤ��ɤ����Ф��ޤ� (����ΥС������ǥ��ݡ���ͽ��)��
36
- DTD�˴ؤ�������������ϥ����å�����ޤ���
37
-
38
- en| * It is impossible to parse an XML document encoded in UTF-16
39
- en| directly.
40
- en| * By default, it is not checked for illegal characters which
41
- en| must not appear in an XML document or in a context.
42
- en| * XMLscan doesn't read any external entities. Well-formedness
43
- en| constraints for external entities are not checked.
44
- en| * XMLscan skips an internal DTD subset. (it will be supported
45
- en| in future version). Well-formedness constraints for an
46
- en| internal DTD subset are not checked.
47
-
48
-
49
- == XMLScan::XMLScanner �ε��ʤؤ�Ŭ����
50
-
51
- en| == Conformance of XMLScan::XMLScanner
52
-
53
- XMLScan::XMLScanner ��XMLʸ�����Ϥ���XML�����ʸ�����������̿�ᡢ
54
- �����ȡ����ϥ�������λ�����������ǥ�����CDATA��������󡢰��̼��λ��ȡ�
55
- �����ʸ�����Ȥ�ǧ�ΤΤߤ�Ԥ��ޤ����ʲ��˽Ҥ٤��������ơ�
56
- ����餬����ƤϤʤ�ʤ�ʸ̮�Ǹ��줿�Ȥ��Ƥ⡢���顼�ˤʤ�ޤ���
57
-
58
- en| XMLScan::XMLScanner tokenize an XML document and only recognize
59
- en| each XML declaration, document type declaration, processing
60
- en| instruction, comment, start tag, end tag, empty element tag,
61
- en| CDATA section, general entity reference, and character reference.
62
- en| It is NOT an error even that one of these parts appears in the
63
- en| context which prohibits existence of it, except in the case
64
- en| described below.
65
-
66
- XML�����ʸ����� (����DTD���֥��åȤ����)������̿�ᡢ�����ȡ�
67
- ���ϥ�������λ�����������ǥ�����CDATA��������󡢰��̼��λ��ȡ������
68
- ʸ�����Ȥ� XML 1.0 Specification ((<[XML]>)) ������������§��
69
- �ޥå����ʤ���硢���ϥ��顼�Ȥʤ�ޤ���
70
-
71
- en| It is reported as an parse error that an XML declaration,
72
- en| document type definition (except internal DTD subset),
73
- en| processing instruction, comment, start tag, end tag, empty
74
- en| element tag, CDATA section, general entity reference, or a
75
- en| character reference is not matched with its production defined
76
- en| in XML 1.0 Specification ((<[XML]>)).
77
-
78
- ����Ū�ʽ���®�٤����뤿�ᡢstrict_char ���ץ���󤬻��ꤵ��Ƥ��ʤ�
79
- ��硢̾����ʸ���ǡ������˻��Ѥ�ǧ����ʤ�ʸ�����ޤޤ�Ƥ��ʤ����Ȥ�
80
- �������ޤ��󡣤���ʸ̮�Ƕ��ڤ�ҤȤ���ǧ�������٤�ʸ������������Ƥ�
81
- ʸ������ǧ����ޤ�������Ū�ˤϡ�strict_char ���ץ���󤬻��ꤵ���
82
- ���ʤ���С�������§ Char[2], Name[5], Nmtoken[7], EntityValue[9],
83
- AttValue[10], SystemLiteral[11], PubidChar[13], CharData[14],
84
- VersionNum[26], EncName[81] �ϸ�̩�˥����å�����ޤ���
85
-
86
- en| For reasonably speed, if `strict_char' option is not specified,
87
- en| XMLScan::XMLScanner doesn't check whether a name or character
88
- en| data includes an illegal characters for it. All characters
89
- en| except ones recognized as one of delimiters in that context
90
- en| are allowed. To be more precise, without `strict_char' option,
91
- en| the production Char[2], Name[5], Nmtoken[7], EntityValue[9],
92
- en| AttValue[10], SystemLiteral[11], PubidChar[13], CharData[14],
93
- en| VersionNum[26], and EncName[81] are not checked strictly.
94
-
95
- ��������������Ԥ��ޤ���
96
-
97
- en| XMLScan::XMLScanner doesn't normalize linebreaks.
98
-
99
- Ruby ���Τ����ݡ��Ȥ��Ƥ��ʤ����ᡢUTF-16 �ǽ񤫤줿ʸ���
100
- ľ�ܲ��Ϥ��뤳�ȤϤǤ��ޤ��󡣲������˰�ö UTF-8 ���Ѵ�����
101
- ɬ�פ�����ޤ���
102
-
103
- en| Since Ruby is not supported UTF-16, it is impossible to parse
104
- en| an XML document encoded in UTF-16 as it is. You need to convert
105
- en| it to UTF-8 before parsing.
106
-
107
- ʸ�����Ƭ�ʳ��� `<?xml' �����줿���ϡ���������̿��Ȥߤʤ��ޤ���
108
-
109
- en| `<?xml' in a place except the beginning of an XML document is
110
- en| regarded as a processing instruction.
111
-
112
- ������ɥ�����ʸ������� yes �ޤ��� no �Ǥ��뤫������å����ޤ���
113
-
114
- en| It is not checked whether the value of a standalone document
115
- en| documentation is either "yes" or "no".
116
-
117
- ����̿��Υ������åȤ� xml �Ǥʤ����Ȥ�����å����ޤ���
118
-
119
- en| It is not checked whether a target in a processing instruction
120
- en| is not "xml" or like, which is a reserved target.
121
-
122
- ʸ����������񤭰ʳ��˸��줿��硢�ޤ�2��ʾ帽�줿����
123
- ���ϥ��顼�Ȥʤ�ޤ���
124
-
125
- en| It is reported as a parse error in the case that a document type
126
- en| declaration appears in a place except prolog, or two or more
127
- en| document type declarations are found in one document.
128
-
129
- °���ͤ���� `<' ��ʸ����ľ�ܸ��줿��硢�����������ȿ���顼��
130
- �ʤ�ޤ���strict_char ���ץ���󤬻��ꤵ��Ƥ����硢����������
131
- "Legal Character" ������å����ޤ�������ʳ�������������Ϥޤä���
132
- �����å�����ޤ���
133
-
134
- en| It is reported as a well-formedness constraint violation
135
- en| that `<' appears directly in a attribute value. If strict_char
136
- en| option is specified, XMLScan::XMLScanner checks
137
- en| well-formedness constraint: Legal Character.
138
- en| Any other well-formedness constraints are not checked.
139
-
140
- ����DTD���֥��åȤ��ɤ����Ф��ޤ���
141
-
142
- en| XMLScan::XMLScanner skips an internal DTD subset.
143
-
144
-
145
- == XMLScan::XMLParser �ε��ʤؤ�Ŭ����
146
-
147
- en| == Conformance of XMLScan::XMLParser
148
-
149
- XMLScan::XMLParser �ϡ��������򸡾ڤ��ʤ�XML�ץ������Ȥ��Ƶ�����
150
- ���ΤۤȤ�����Ƥ����������Ȥ���ɸ�ˤ��Ƥ��ޤ���
151
-
152
- en| The goal of XMLScan::XMLParser is to satisfy almost all
153
- en| conditions required to a non-validating XML parser.
154
-
155
- XMLScan::XMLScanner �� strict_char ���ץ����˴ؤ��뵭�ҡ��ڤ�
156
- UTF-16 �˴ؤ��뵭�Ҥϡ����Τޤ� XMLScan::XMLParser �ˤ����ƤϤޤ�ޤ���
157
- ʸ�����Ȥ˴ؤ���ʲ�������ϡ�strict_char ���ץ���󤬻��ꤵ�줿
158
- ���Τߥ����å�����ޤ���
159
-
160
- en| The description for XMLScan::XMLScanner about `strict_char'
161
- en| option and the description for UTF-16 are applicable to
162
- en| XMLScan::XMLParser. The following well-formedness constraints
163
- en| about a character reference are checked only if `strict_char'
164
- en| option is specified;
165
-
166
- * Well-formedness constraint: Legal Character
167
-
168
- ��������������Ԥ��ޤ���
169
-
170
- en| XMLScan::XMLScanner doesn't normalize linebreaks.
171
-
172
- ����DTD���֥��åȤ��ɤ����Ф��ޤ�������DTD���֥��åȤ˴ؤ���ʲ���
173
- ����������ϥ����å�����ޤ���
174
-
175
- en| XMLScan::XMLParser skips an internal DTD subset. The following
176
- en| well-formedness constraints about an internal DTD subset are
177
- en| not checked;
178
-
179
- * Well-formedness constraint: PEs in Internal Subset
180
- * Well-formedness constraint: PE Between Declarations
181
- * Well-formedness constraint: No External Entity References
182
- * Well-formedness constraint: Entity Declared
183
- * Well-formedness constraint: Parsed Entity
184
- * Well-formedness constraint: No Recursion
185
- * Well-formedness constraint: In DTD
186
-
187
- ����Ѥ߼��� (lt,gt,amp,quot,apos) ��������Ƥΰ��̼��λ��Ȥϡ�
188
- ������ɤ߹��ޤ�Ƥ��ʤ����Τؤλ��ȤȤ�����𤵤�ޤ���
189
-
190
- en| All general entity references except ones to predefined entities
191
- en| (lt,gt,amp,quot,apos) are reported as ones to undeclared entities.
192
-
193
- ����DTD���֥��åȤϼ����ߤޤ��󡣳���DTD���֥��åȤ˴ؤ���ʲ���
194
- ����������ϥ����å�����ޤ���
195
-
196
- en| External DTD subsets are not read. The following well-formedness
197
- en| constraints about an external DTD subset are not checked;
198
-
199
- * Well-formedness constraint: External Subset
200
-
201
- ������ɤ߹���Ǥ��ʤ����Τ��ִ��ƥ����Ȥ� < ���ޤޤ�Ƥ��뤳�Ȥ�
202
- ��ǧ�Ǥ��ʤ����ᡢ�ʲ�������������ϥ����å�����ޤ���
203
-
204
- en| Since XMLScan::XMLParser cannot check whether a replacement text
205
- en| of an undeclared entity includes `<', the following
206
- en| well-formedness constraints are not checked completely;
207
-
208
- * Well-formedness constraint: No < in Attribute Values
209
-
210
-
211
- == XMLScan::XMLNamespace �ε��ʤؤ�Ŭ����
212
-
213
- en| == Conformance of XMLScan::XMLNamespace
214
-
215
- XMLScan::XMLNamespace �� Namespaces in XML �ڤӤ��� errata ((<[Namespaces]>))
216
- �����������Ƥ����������å����� XML ʸ��̾������������
217
- (namespace-well-formed) �Ǥ��뤳�Ȥ��ǧ���ޤ���
218
-
219
- en| XMLScan::XMLNamespace checks for all constraints specified in
220
- en| ``Namespaces in XML'' and its errata ((<[Namespaces]>)), and
221
- en| ensure that an XML document is namespace-well-formed.
222
-
223
- XMLScan::XMLParser �˵����������¤ϡ����Τޤ� XMLScan::XMLNamespace
224
- �ˤ�Ѿ�����ޤ���
225
-
226
- en| All limitations for XMLScan::XMLParser are inherited to
227
- en| XMLScan::XMLNamespace.
228
-
229
-
230
- == ����ʸ��
231
- en| == References
232
-
233
- : [XML]
234
- W3C (World Wide Web Consortium).
235
- Extensible Markup Language (XML) 1.0 (Second Edition),
236
- January 2000.
237
- ((<URL:http://www.w3.org/TR/2000/REC-xml-20001006>))
238
-
239
- : [Namespaces]
240
- W3C (World Wide Web Consortium).
241
- Namespaces in XML,
242
- January 1999.
243
- ((<URL:http://www.w3.org/TR/1999/REC-xml-names-19990114>)).
244
- ���פ������� ((<URL:http://www.w3.org/XML/xml-names-19990114-errata>))
245
- �˴ޤޤ�Ƥ���.
246
-
247
- en| : [Namespaces]
248
- en| W3C (World Wide Web Consortium).
249
- en| Namespaces in XML,
250
- en| January 1999.
251
- en| ((<URL:http://www.w3.org/TR/1999/REC-xml-names-19990114>)).
252
- en| Important corrections are found at
253
- en| ((<URL:http://www.w3.org/XML/xml-names-19990114-errata>)).
254
-
255
-
256
- =end