rgen 0.5.4 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +28 -0
- data/Rakefile +3 -4
- data/lib/ea_support/uml13_ea_metamodel.rb +3 -3
- data/lib/ea_support/uml13_ea_to_uml13.rb +33 -2
- data/lib/ea_support/uml13_to_uml13_ea.rb +7 -0
- data/lib/mmgen/mm_ext/ecore_mmgen_ext.rb +4 -4
- data/lib/mmgen/templates/metamodel_generator.tpl +143 -143
- data/lib/rgen/ecore/ecore.rb +11 -1
- data/lib/rgen/ecore/ecore_interface.rb +47 -0
- data/lib/rgen/ecore/ecore_to_ruby.rb +166 -0
- data/lib/rgen/ecore/{ecore_transformer.rb → ruby_to_ecore.rb} +11 -11
- data/lib/rgen/environment.rb +15 -2
- data/lib/rgen/fragment/dump_file_cache.rb +63 -0
- data/lib/rgen/fragment/fragmented_model.rb +139 -0
- data/lib/rgen/fragment/model_fragment.rb +268 -0
- data/lib/rgen/instantiator/abstract_xml_instantiator.rb +44 -72
- data/lib/rgen/instantiator/default_xml_instantiator.rb +2 -2
- data/lib/rgen/instantiator/ecore_xml_instantiator.rb +16 -1
- data/lib/rgen/instantiator/json_instantiator.rb +16 -2
- data/lib/rgen/instantiator/nodebased_xml_instantiator.rb +118 -138
- data/lib/rgen/instantiator/qualified_name_resolver.rb +5 -1
- data/lib/rgen/instantiator/reference_resolver.rb +126 -24
- data/lib/rgen/instantiator/xmi11_instantiator.rb +6 -2
- data/lib/rgen/metamodel_builder.rb +18 -6
- data/lib/rgen/metamodel_builder/builder_extensions.rb +431 -407
- data/lib/rgen/metamodel_builder/builder_runtime.rb +8 -8
- data/lib/rgen/metamodel_builder/constant_order_helper.rb +4 -4
- data/lib/rgen/metamodel_builder/data_types.rb +5 -1
- data/lib/rgen/metamodel_builder/intermediate/feature.rb +167 -0
- data/lib/rgen/metamodel_builder/module_extension.rb +2 -2
- data/lib/rgen/model_builder.rb +10 -5
- data/lib/rgen/model_builder/builder_context.rb +17 -1
- data/lib/rgen/serializer/opposite_reference_filter.rb +18 -0
- data/lib/rgen/serializer/qualified_name_provider.rb +45 -0
- data/lib/rgen/template_language/template_container.rb +3 -1
- data/lib/rgen/{auto_class_creator.rb → util/auto_class_creator.rb} +6 -1
- data/lib/rgen/util/cached_glob.rb +67 -0
- data/lib/rgen/util/file_cache_map.rb +104 -0
- data/lib/rgen/util/file_change_detector.rb +78 -0
- data/lib/rgen/{method_delegation.rb → util/method_delegation.rb} +18 -3
- data/lib/rgen/{model_comparator.rb → util/model_comparator.rb} +17 -5
- data/lib/rgen/{model_comparator_base.rb → util/model_comparator_base.rb} +6 -1
- data/lib/rgen/{model_dumper.rb → util/model_dumper.rb} +6 -1
- data/lib/rgen/{name_helper.rb → util/name_helper.rb} +6 -1
- data/lib/rgen/util/pattern_matcher.rb +329 -0
- data/lib/transformers/uml13_to_ecore.rb +103 -60
- data/test/ecore_self_test.rb +43 -42
- data/test/json_test.rb +15 -0
- data/test/metamodel_builder_test.rb +361 -206
- data/test/metamodel_from_ecore_test.rb +45 -0
- data/test/metamodel_order_test.rb +10 -4
- data/test/metamodel_roundtrip_test.rb +2 -2
- data/test/metamodel_roundtrip_test/TestModel_Regenerated.rb +1 -1
- data/test/metamodel_roundtrip_test/houseMetamodel_Regenerated.ecore +50 -50
- data/test/method_delegation_test.rb +9 -9
- data/test/model_builder/ecore_internal.rb +19 -9
- data/test/model_builder/serializer_test.rb +1 -1
- data/test/reference_resolver_test.rb +79 -12
- data/test/rgen_test.rb +2 -0
- data/test/template_language_test.rb +7 -0
- data/test/template_language_test/templates/callback_indent_test/a.tpl +12 -0
- data/test/template_language_test/templates/callback_indent_test/b.tpl +5 -0
- data/test/testmodel/ea_testmodel_regenerated.xml +588 -583
- data/test/transformer_test.rb +3 -3
- data/test/util/file_cache_map_test.rb +91 -0
- data/test/util/file_cache_map_test/testdir/fileA +1 -0
- data/test/util_test.rb +4 -0
- data/test/xml_instantiator_test.rb +139 -135
- metadata +49 -104
- data/lib/rgen/ecore/ecore_instantiator.rb +0 -31
- data/lib/rgen/metamodel_builder/metamodel_description.rb +0 -232
- data/redist/xmlscan/ChangeLog +0 -1301
- data/redist/xmlscan/README +0 -34
- data/redist/xmlscan/THANKS +0 -11
- data/redist/xmlscan/doc/changes.html +0 -74
- data/redist/xmlscan/doc/changes.rd +0 -80
- data/redist/xmlscan/doc/en/conformance.html +0 -136
- data/redist/xmlscan/doc/en/conformance.rd +0 -152
- data/redist/xmlscan/doc/en/manual.html +0 -356
- data/redist/xmlscan/doc/en/manual.rd +0 -402
- data/redist/xmlscan/doc/ja/conformance.ja.html +0 -118
- data/redist/xmlscan/doc/ja/conformance.ja.rd +0 -134
- data/redist/xmlscan/doc/ja/manual.ja.html +0 -325
- data/redist/xmlscan/doc/ja/manual.ja.rd +0 -370
- data/redist/xmlscan/doc/src/Makefile +0 -41
- data/redist/xmlscan/doc/src/conformance.rd.src +0 -256
- data/redist/xmlscan/doc/src/langsplit.rb +0 -110
- data/redist/xmlscan/doc/src/manual.rd.src +0 -614
- data/redist/xmlscan/install.rb +0 -41
- data/redist/xmlscan/lib/xmlscan/encoding.rb +0 -311
- data/redist/xmlscan/lib/xmlscan/htmlscan.rb +0 -289
- data/redist/xmlscan/lib/xmlscan/namespace.rb +0 -352
- data/redist/xmlscan/lib/xmlscan/parser.rb +0 -299
- data/redist/xmlscan/lib/xmlscan/scanner.rb +0 -1109
- data/redist/xmlscan/lib/xmlscan/version.rb +0 -22
- data/redist/xmlscan/lib/xmlscan/visitor.rb +0 -158
- data/redist/xmlscan/lib/xmlscan/xmlchar.rb +0 -441
- data/redist/xmlscan/memo/CONFORMANCE +0 -1249
- data/redist/xmlscan/memo/PRODUCTIONS +0 -195
- data/redist/xmlscan/memo/contentspec.ry +0 -335
- data/redist/xmlscan/samples/chibixml.rb +0 -105
- data/redist/xmlscan/samples/getxmlchar.rb +0 -122
- data/redist/xmlscan/samples/rexml.rb +0 -159
- data/redist/xmlscan/samples/xmlbench.rb +0 -88
- data/redist/xmlscan/samples/xmlbench/parser/chibixml.rb +0 -22
- data/redist/xmlscan/samples/xmlbench/parser/nqxml.rb +0 -29
- data/redist/xmlscan/samples/xmlbench/parser/rexml.rb +0 -62
- data/redist/xmlscan/samples/xmlbench/parser/xmlparser.rb +0 -22
- data/redist/xmlscan/samples/xmlbench/parser/xmlscan-0.0.10.rb +0 -62
- data/redist/xmlscan/samples/xmlbench/parser/xmlscan-chibixml.rb +0 -22
- data/redist/xmlscan/samples/xmlbench/parser/xmlscan-rexml.rb +0 -22
- data/redist/xmlscan/samples/xmlbench/parser/xmlscan.rb +0 -99
- data/redist/xmlscan/samples/xmlbench/xmlbench-lib.rb +0 -116
- data/redist/xmlscan/samples/xmlconftest.rb +0 -200
- data/redist/xmlscan/test.rb +0 -7
- data/redist/xmlscan/tests/deftestcase.rb +0 -73
- data/redist/xmlscan/tests/runtest.rb +0 -47
- data/redist/xmlscan/tests/testall.rb +0 -14
- data/redist/xmlscan/tests/testencoding.rb +0 -438
- data/redist/xmlscan/tests/testhtmlscan.rb +0 -752
- data/redist/xmlscan/tests/testnamespace.rb +0 -457
- data/redist/xmlscan/tests/testparser.rb +0 -591
- data/redist/xmlscan/tests/testscanner.rb +0 -1749
- data/redist/xmlscan/tests/testxmlchar.rb +0 -143
- data/redist/xmlscan/tests/visitor.rb +0 -34
data/redist/xmlscan/README
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
xmlscan
|
2
|
-
=======
|
3
|
-
|
4
|
-
The fastest XML parser written in 100% pure Ruby.
|
5
|
-
|
6
|
-
Installation
|
7
|
-
------------
|
8
|
-
|
9
|
-
Run install.rb. Type as follows:
|
10
|
-
|
11
|
-
$ ruby install.rb
|
12
|
-
|
13
|
-
Samples
|
14
|
-
-------
|
15
|
-
|
16
|
-
In directory `samples', there are sample programs.
|
17
|
-
|
18
|
-
LICENCE
|
19
|
-
-------
|
20
|
-
|
21
|
-
This module's license is the same of Ruby. You can redistribute
|
22
|
-
it and/or modify it under the same term as Ruby.
|
23
|
-
|
24
|
-
Japanese: http://www.ruby-lang.org/ja/LICENSE.txt
|
25
|
-
English: http://www.ruby-lang.org/en/LICENSE.txt
|
26
|
-
|
27
|
-
Bug Reports
|
28
|
-
-----------
|
29
|
-
|
30
|
-
Any kinds of comments and bug reports are welcome.
|
31
|
-
If you find bugs, please email me.
|
32
|
-
|
33
|
-
|
34
|
-
UENO Katsuhiro <katsu@blue.sky.or.jp>
|
data/redist/xmlscan/THANKS
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
$Id: THANKS,v 1.5 2003/02/15 13:21:39 katsu Exp $
|
2
|
-
|
3
|
-
Thanks to all of the following for their valuable hints, fixes,
|
4
|
-
discussions, and contributions:
|
5
|
-
|
6
|
-
Yoshida Masato <yoshidam@yoshidam.net>
|
7
|
-
TAKAHASHI Masayoshi <maki@inac.co.jp>
|
8
|
-
NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
|
9
|
-
James Britt <james@jamesbritt.com>
|
10
|
-
Takaaki Tateishi <ttate@kt.jaist.ac.jp>
|
11
|
-
Tanaka Akira <akr@m17n.org>
|
@@ -1,74 +0,0 @@
|
|
1
|
-
<?xml version="1.0" ?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
6
|
-
<head>
|
7
|
-
<title>changes.rd</title>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
<h1><a name="label-0" id="label-0">Changes of xmlscan</a></h1><!-- RDLabel: "Changes of xmlscan" -->
|
11
|
-
<h2><a name="label-1" id="label-1">0.3 series</a></h2><!-- RDLabel: "0.3 series" -->
|
12
|
-
<h3><a name="label-2" id="label-2">0.3.0</a></h3><!-- RDLabel: "0.3.0" -->
|
13
|
-
<ul>
|
14
|
-
<li>The head of development.</li>
|
15
|
-
</ul>
|
16
|
-
<h2><a name="label-3" id="label-3">0.2 series</a></h2><!-- RDLabel: "0.2 series" -->
|
17
|
-
<h3><a name="label-4" id="label-4">0.2.1 - Jan 23, 2003</a></h3><!-- RDLabel: "0.2.1 - Jan 23, 2003" -->
|
18
|
-
<ul>
|
19
|
-
<li>Independented from $KCODE. XMLScanner#kcode and XMLScanner#kcode= were
|
20
|
-
added.</li>
|
21
|
-
<li>XMLScan::XMLParser doesn't replace any entity references.
|
22
|
-
XMLScan::XMLParser::PredefinedEntity was removed.</li>
|
23
|
-
<li>XMLScan::XMLParser doesn't exchange any method calls. The following
|
24
|
-
methods were never called in xmlscan-0.1, but are called in xmlscan-0.2.
|
25
|
-
<ul>
|
26
|
-
<li>XMLScan::Visitor#on_charref_hex</li>
|
27
|
-
<li>XMLScan::Visitor#on_attr_charref_hex</li>
|
28
|
-
<li>XMLScan::Visitor#on_stag_end_empty</li>
|
29
|
-
</ul></li>
|
30
|
-
<li>XMLScan::XMLChar now uses regular expressions to search illegal
|
31
|
-
characters in an XML document. The parsing speed of XMLScan::XMLParser
|
32
|
-
with :strict_char option was dramatically improved.</li>
|
33
|
-
<li>Fixed a few bugs in XMLScan::XMLScanner.</li>
|
34
|
-
<li>Improved parsing speed.</li>
|
35
|
-
<li>Ready for Ruby-1.8.</li>
|
36
|
-
</ul>
|
37
|
-
<h2><a name="label-5" id="label-5">0.1 series</a></h2><!-- RDLabel: "0.1 series" -->
|
38
|
-
<h3><a name="label-6" id="label-6">0.1.3 - Jan 10, 2003</a></h3><!-- RDLabel: "0.1.3 - Jan 10, 2003" -->
|
39
|
-
<ul>
|
40
|
-
<li>Added install.rb, which is an simple installer.</li>
|
41
|
-
<li>Fixed a couple of bugs.</li>
|
42
|
-
<li>Improved parsing speed.</li>
|
43
|
-
<li>Rewrote sample benchmark script.</li>
|
44
|
-
</ul>
|
45
|
-
<h3><a name="label-7" id="label-7">0.1.2 - Dec 20, 2002</a></h3><!-- RDLabel: "0.1.2 - Dec 20, 2002" -->
|
46
|
-
<ul>
|
47
|
-
<li>Fixed several bugs in XMLScan::XMLScanner.</li>
|
48
|
-
<li>XMLScan::Visitor was moved from scanner.rb to visitor.rb.</li>
|
49
|
-
<li>XMLScan::Version was renamed to XMLScan::VERSION.</li>
|
50
|
-
<li>Added new constant XMLScan::RELEASE_DATE.</li>
|
51
|
-
</ul>
|
52
|
-
<h3><a name="label-8" id="label-8">0.1.1 - Oct 10, 2002</a></h3><!-- RDLabel: "0.1.1 - Oct 10, 2002" -->
|
53
|
-
<ul>
|
54
|
-
<li>The first stable version of xmlscan.</li>
|
55
|
-
</ul>
|
56
|
-
<h3><a name="label-9" id="label-9">0.1.0rc2 - Sep 30, 2002</a></h3><!-- RDLabel: "0.1.0rc2 - Sep 30, 2002" -->
|
57
|
-
<ul>
|
58
|
-
<li>Another release candidate.</li>
|
59
|
-
</ul>
|
60
|
-
<h3><a name="label-10" id="label-10">0.1.0rc1 - Sep 28, 2002</a></h3><!-- RDLabel: "0.1.0rc1 - Sep 28, 2002" -->
|
61
|
-
<ul>
|
62
|
-
<li>An release candidate for the stable release.</li>
|
63
|
-
</ul>
|
64
|
-
<h3><a name="label-11" id="label-11">0.1.0-20020920 - Sep 20, 2000</a></h3><!-- RDLabel: "0.1.0-20020920 - Sep 20, 2000" -->
|
65
|
-
<ul>
|
66
|
-
<li>Restarted the project, and this is the first announced version of
|
67
|
-
new xmlscan.</li>
|
68
|
-
</ul>
|
69
|
-
<h2><a name="label-12" id="label-12">0.0 series</a></h2><!-- RDLabel: "0.0 series" -->
|
70
|
-
<p>All versions before 0.1.0-20020920 are called as ``ancient xmlscan'',
|
71
|
-
since they are so old that even the author have forgotten what they are ;p</p>
|
72
|
-
|
73
|
-
</body>
|
74
|
-
</html>
|
@@ -1,80 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
# $Id: changes.rd,v 1.3 2003/01/22 17:02:25 katsu Exp $
|
3
|
-
|
4
|
-
= Changes of xmlscan
|
5
|
-
|
6
|
-
== 0.3 series
|
7
|
-
|
8
|
-
=== 0.3.0
|
9
|
-
|
10
|
-
* The head of development.
|
11
|
-
|
12
|
-
|
13
|
-
== 0.2 series
|
14
|
-
|
15
|
-
=== 0.2.1 - Jan 23, 2003
|
16
|
-
|
17
|
-
* Independented from $KCODE. XMLScanner#kcode and XMLScanner#kcode= were
|
18
|
-
added.
|
19
|
-
|
20
|
-
* XMLScan::XMLParser doesn't replace any entity references.
|
21
|
-
XMLScan::XMLParser::PredefinedEntity was removed.
|
22
|
-
|
23
|
-
* XMLScan::XMLParser doesn't exchange any method calls. The following
|
24
|
-
methods were never called in xmlscan-0.1, but are called in xmlscan-0.2.
|
25
|
-
* XMLScan::Visitor#on_charref_hex
|
26
|
-
* XMLScan::Visitor#on_attr_charref_hex
|
27
|
-
* XMLScan::Visitor#on_stag_end_empty
|
28
|
-
|
29
|
-
* XMLScan::XMLChar now uses regular expressions to search illegal
|
30
|
-
characters in an XML document. The parsing speed of XMLScan::XMLParser
|
31
|
-
with :strict_char option was dramatically improved.
|
32
|
-
|
33
|
-
* Fixed a few bugs in XMLScan::XMLScanner.
|
34
|
-
|
35
|
-
* Improved parsing speed.
|
36
|
-
|
37
|
-
* Ready for Ruby-1.8.
|
38
|
-
|
39
|
-
|
40
|
-
== 0.1 series
|
41
|
-
|
42
|
-
=== 0.1.3 - Jan 10, 2003
|
43
|
-
|
44
|
-
* Added install.rb, which is an simple installer.
|
45
|
-
* Fixed a couple of bugs.
|
46
|
-
* Improved parsing speed.
|
47
|
-
* Rewrote sample benchmark script.
|
48
|
-
|
49
|
-
=== 0.1.2 - Dec 20, 2002
|
50
|
-
|
51
|
-
* Fixed several bugs in XMLScan::XMLScanner.
|
52
|
-
* XMLScan::Visitor was moved from scanner.rb to visitor.rb.
|
53
|
-
* XMLScan::Version was renamed to XMLScan::VERSION.
|
54
|
-
* Added new constant XMLScan::RELEASE_DATE.
|
55
|
-
|
56
|
-
=== 0.1.1 - Oct 10, 2002
|
57
|
-
|
58
|
-
* The first stable version of xmlscan.
|
59
|
-
|
60
|
-
=== 0.1.0rc2 - Sep 30, 2002
|
61
|
-
|
62
|
-
* Another release candidate.
|
63
|
-
|
64
|
-
=== 0.1.0rc1 - Sep 28, 2002
|
65
|
-
|
66
|
-
* An release candidate for the stable release.
|
67
|
-
|
68
|
-
=== 0.1.0-20020920 - Sep 20, 2000
|
69
|
-
|
70
|
-
* Restarted the project, and this is the first announced version of
|
71
|
-
new xmlscan.
|
72
|
-
|
73
|
-
|
74
|
-
== 0.0 series
|
75
|
-
|
76
|
-
All versions before 0.1.0-20020920 are called as ``ancient xmlscan'',
|
77
|
-
since they are so old that even the author have forgotten what they are ;p
|
78
|
-
|
79
|
-
|
80
|
-
=end
|
@@ -1,136 +0,0 @@
|
|
1
|
-
<?xml version="1.0" ?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
6
|
-
<head>
|
7
|
-
<title>en/conformance.rd</title>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
<h1><a name="label-0" id="label-0">Conformance of xmlscan to the specifications</a></h1><!-- RDLabel: "Conformance of xmlscan to the specifications" -->
|
11
|
-
<p>This document describes the conformance of each parser
|
12
|
-
included in xmlscan for XML related specifications.</p>
|
13
|
-
<h2><a name="label-1" id="label-1">Abstract</a></h2><!-- RDLabel: "Abstract" -->
|
14
|
-
<p>XMLscan is one of "non-validating XML processor" according to
|
15
|
-
XML 1.0 Specification <a href="#label-6">[XML]</a>. XMLscan is satisfied with
|
16
|
-
almost conditions required for a non-validation XML processor,
|
17
|
-
though, for the limitations of implementations, there are mainly
|
18
|
-
the following restrictions. For detail, See the below
|
19
|
-
descriptions for each class.</p>
|
20
|
-
<ul>
|
21
|
-
<li>It is impossible to parse an XML document encoded in UTF-16
|
22
|
-
directly.</li>
|
23
|
-
<li>By default, it is not checked for illegal characters which
|
24
|
-
must not appear in an XML document or in a context.</li>
|
25
|
-
<li>XMLscan doesn't read any external entities. Well-formedness
|
26
|
-
constraints for external entities are not checked.</li>
|
27
|
-
<li>XMLscan skips an internal DTD subset. (it will be supported
|
28
|
-
in future version). Well-formedness constraints for an
|
29
|
-
internal DTD subset are not checked.</li>
|
30
|
-
</ul>
|
31
|
-
<h2><a name="label-2" id="label-2">Conformance of XMLScan::XMLScanner</a></h2><!-- RDLabel: "Conformance of XMLScan::XMLScanner" -->
|
32
|
-
<p>XMLScan::XMLScanner tokenize an XML document and only recognize
|
33
|
-
each XML declaration, document type declaration, processing
|
34
|
-
instruction, comment, start tag, end tag, empty element tag,
|
35
|
-
CDATA section, general entity reference, and character reference.
|
36
|
-
It is NOT an error even that one of these parts appears in the
|
37
|
-
context which prohibits existence of it, except in the case
|
38
|
-
described below.</p>
|
39
|
-
<p>It is reported as an parse error that an XML declaration,
|
40
|
-
document type definition (except internal DTD subset),
|
41
|
-
processing instruction, comment, start tag, end tag, empty
|
42
|
-
element tag, CDATA section, general entity reference, or a
|
43
|
-
character reference is not matched with its production defined
|
44
|
-
in XML 1.0 Specification <a href="#label-6">[XML]</a>.</p>
|
45
|
-
<p>For reasonably speed, if `strict_char' option is not specified,
|
46
|
-
XMLScan::XMLScanner doesn't check whether a name or character
|
47
|
-
data includes an illegal characters for it. All characters
|
48
|
-
except ones recognized as one of delimiters in that context
|
49
|
-
are allowed. To be more precise, without `strict_char' option,
|
50
|
-
the production Char[2], Name[5], Nmtoken[7], EntityValue[9],
|
51
|
-
AttValue[10], SystemLiteral[11], PubidChar[13], CharData[14],
|
52
|
-
VersionNum[26], and EncName[81] are not checked strictly.</p>
|
53
|
-
<p>XMLScan::XMLScanner doesn't normalize linebreaks.</p>
|
54
|
-
<p>Since Ruby is not supported UTF-16, it is impossible to parse
|
55
|
-
an XML document encoded in UTF-16 as it is. You need to convert
|
56
|
-
it to UTF-8 before parsing.</p>
|
57
|
-
<p>`<?xml' in a place except the beginning of an XML document is
|
58
|
-
regarded as a processing instruction.</p>
|
59
|
-
<p>It is not checked whether the value of a standalone document
|
60
|
-
documentation is either "yes" or "no".</p>
|
61
|
-
<p>It is not checked whether a target in a processing instruction
|
62
|
-
is not "xml" or like, which is a reserved target.</p>
|
63
|
-
<p>It is reported as a parse error in the case that a document type
|
64
|
-
declaration appears in a place except prolog, or two or more
|
65
|
-
document type declarations are found in one document.</p>
|
66
|
-
<p>It is reported as a well-formedness constraint violation
|
67
|
-
that `<' appears directly in a attribute value. If strict_char
|
68
|
-
option is specified, XMLScan::XMLScanner checks
|
69
|
-
well-formedness constraint: Legal Character.
|
70
|
-
Any other well-formedness constraints are not checked.</p>
|
71
|
-
<p>XMLScan::XMLScanner skips an internal DTD subset.</p>
|
72
|
-
<h2><a name="label-3" id="label-3">Conformance of XMLScan::XMLParser</a></h2><!-- RDLabel: "Conformance of XMLScan::XMLParser" -->
|
73
|
-
<p>The goal of XMLScan::XMLParser is to satisfy almost all
|
74
|
-
conditions required to a non-validating XML parser.</p>
|
75
|
-
<p>The description for XMLScan::XMLScanner about `strict_char'
|
76
|
-
option and the description for UTF-16 are applicable to
|
77
|
-
XMLScan::XMLParser. The following well-formedness constraints
|
78
|
-
about a character reference are checked only if `strict_char'
|
79
|
-
option is specified;</p>
|
80
|
-
<ul>
|
81
|
-
<li>Well-formedness constraint: Legal Character</li>
|
82
|
-
</ul>
|
83
|
-
<p>XMLScan::XMLScanner doesn't normalize linebreaks.</p>
|
84
|
-
<p>XMLScan::XMLParser skips an internal DTD subset. The following
|
85
|
-
well-formedness constraints about an internal DTD subset are
|
86
|
-
not checked;</p>
|
87
|
-
<ul>
|
88
|
-
<li>Well-formedness constraint: PEs in Internal Subset</li>
|
89
|
-
<li>Well-formedness constraint: PE Between Declarations</li>
|
90
|
-
<li>Well-formedness constraint: No External Entity References</li>
|
91
|
-
<li>Well-formedness constraint: Entity Declared</li>
|
92
|
-
<li>Well-formedness constraint: Parsed Entity</li>
|
93
|
-
<li>Well-formedness constraint: No Recursion</li>
|
94
|
-
<li>Well-formedness constraint: In DTD</li>
|
95
|
-
</ul>
|
96
|
-
<p>All general entity references except ones to predefined entities
|
97
|
-
(lt,gt,amp,quot,apos) are reported as ones to undeclared entities.</p>
|
98
|
-
<p>External DTD subsets are not read. The following well-formedness
|
99
|
-
constraints about an external DTD subset are not checked;</p>
|
100
|
-
<ul>
|
101
|
-
<li>Well-formedness constraint: External Subset</li>
|
102
|
-
</ul>
|
103
|
-
<p>Since XMLScan::XMLParser cannot check whether a replacement text
|
104
|
-
of an undeclared entity includes `<', the following
|
105
|
-
well-formedness constraints are not checked completely;</p>
|
106
|
-
<ul>
|
107
|
-
<li>Well-formedness constraint: No < in Attribute Values</li>
|
108
|
-
</ul>
|
109
|
-
<h2><a name="label-4" id="label-4">Conformance of XMLScan::XMLNamespace</a></h2><!-- RDLabel: "Conformance of XMLScan::XMLNamespace" -->
|
110
|
-
<p>XMLScan::XMLNamespace checks for all constraints specified in
|
111
|
-
``Namespaces in XML'' and its errata <a href="#label-7">[Namespaces]</a>, and
|
112
|
-
ensure that an XML document is namespace-well-formed.</p>
|
113
|
-
<p>All limitations for XMLScan::XMLParser are inherited to
|
114
|
-
XMLScan::XMLNamespace.</p>
|
115
|
-
<h2><a name="label-5" id="label-5">References</a></h2><!-- RDLabel: "References" -->
|
116
|
-
<dl>
|
117
|
-
<dt><a name="label-6" id="label-6">[XML]</a></dt><!-- RDLabel: "[XML]" -->
|
118
|
-
<dd>
|
119
|
-
W3C (World Wide Web Consortium).
|
120
|
-
Extensible Markup Language (XML) 1.0 (Second Edition),
|
121
|
-
January 2000.
|
122
|
-
<a href="http://www.w3.org/TR/2000/REC-xml-20001006"><URL:http://www.w3.org/TR/2000/REC-xml-20001006></a>
|
123
|
-
</dd>
|
124
|
-
<dt><a name="label-7" id="label-7">[Namespaces]</a></dt><!-- RDLabel: "[Namespaces]" -->
|
125
|
-
<dd>
|
126
|
-
W3C (World Wide Web Consortium).
|
127
|
-
Namespaces in XML,
|
128
|
-
January 1999.
|
129
|
-
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114"><URL:http://www.w3.org/TR/1999/REC-xml-names-19990114></a>.
|
130
|
-
Important corrections are found at
|
131
|
-
<a href="http://www.w3.org/XML/xml-names-19990114-errata"><URL:http://www.w3.org/XML/xml-names-19990114-errata></a>.
|
132
|
-
</dd>
|
133
|
-
</dl>
|
134
|
-
|
135
|
-
</body>
|
136
|
-
</html>
|
@@ -1,152 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
# $Id: conformance.rd.src,v 1.1 2003/01/22 16:41:45 katsu Exp $
|
3
|
-
|
4
|
-
= Conformance of xmlscan to the specifications
|
5
|
-
|
6
|
-
This document describes the conformance of each parser
|
7
|
-
included in xmlscan for XML related specifications.
|
8
|
-
|
9
|
-
== Abstract
|
10
|
-
|
11
|
-
XMLscan is one of "non-validating XML processor" according to
|
12
|
-
XML 1.0 Specification ((<[XML]>)). XMLscan is satisfied with
|
13
|
-
almost conditions required for a non-validation XML processor,
|
14
|
-
though, for the limitations of implementations, there are mainly
|
15
|
-
the following restrictions. For detail, See the below
|
16
|
-
descriptions for each class.
|
17
|
-
|
18
|
-
* It is impossible to parse an XML document encoded in UTF-16
|
19
|
-
directly.
|
20
|
-
* By default, it is not checked for illegal characters which
|
21
|
-
must not appear in an XML document or in a context.
|
22
|
-
* XMLscan doesn't read any external entities. Well-formedness
|
23
|
-
constraints for external entities are not checked.
|
24
|
-
* XMLscan skips an internal DTD subset. (it will be supported
|
25
|
-
in future version). Well-formedness constraints for an
|
26
|
-
internal DTD subset are not checked.
|
27
|
-
|
28
|
-
|
29
|
-
== Conformance of XMLScan::XMLScanner
|
30
|
-
|
31
|
-
XMLScan::XMLScanner tokenize an XML document and only recognize
|
32
|
-
each XML declaration, document type declaration, processing
|
33
|
-
instruction, comment, start tag, end tag, empty element tag,
|
34
|
-
CDATA section, general entity reference, and character reference.
|
35
|
-
It is NOT an error even that one of these parts appears in the
|
36
|
-
context which prohibits existence of it, except in the case
|
37
|
-
described below.
|
38
|
-
|
39
|
-
It is reported as an parse error that an XML declaration,
|
40
|
-
document type definition (except internal DTD subset),
|
41
|
-
processing instruction, comment, start tag, end tag, empty
|
42
|
-
element tag, CDATA section, general entity reference, or a
|
43
|
-
character reference is not matched with its production defined
|
44
|
-
in XML 1.0 Specification ((<[XML]>)).
|
45
|
-
|
46
|
-
For reasonably speed, if `strict_char' option is not specified,
|
47
|
-
XMLScan::XMLScanner doesn't check whether a name or character
|
48
|
-
data includes an illegal characters for it. All characters
|
49
|
-
except ones recognized as one of delimiters in that context
|
50
|
-
are allowed. To be more precise, without `strict_char' option,
|
51
|
-
the production Char[2], Name[5], Nmtoken[7], EntityValue[9],
|
52
|
-
AttValue[10], SystemLiteral[11], PubidChar[13], CharData[14],
|
53
|
-
VersionNum[26], and EncName[81] are not checked strictly.
|
54
|
-
|
55
|
-
XMLScan::XMLScanner doesn't normalize linebreaks.
|
56
|
-
|
57
|
-
Since Ruby is not supported UTF-16, it is impossible to parse
|
58
|
-
an XML document encoded in UTF-16 as it is. You need to convert
|
59
|
-
it to UTF-8 before parsing.
|
60
|
-
|
61
|
-
`<?xml' in a place except the beginning of an XML document is
|
62
|
-
regarded as a processing instruction.
|
63
|
-
|
64
|
-
It is not checked whether the value of a standalone document
|
65
|
-
documentation is either "yes" or "no".
|
66
|
-
|
67
|
-
It is not checked whether a target in a processing instruction
|
68
|
-
is not "xml" or like, which is a reserved target.
|
69
|
-
|
70
|
-
It is reported as a parse error in the case that a document type
|
71
|
-
declaration appears in a place except prolog, or two or more
|
72
|
-
document type declarations are found in one document.
|
73
|
-
|
74
|
-
It is reported as a well-formedness constraint violation
|
75
|
-
that `<' appears directly in a attribute value. If strict_char
|
76
|
-
option is specified, XMLScan::XMLScanner checks
|
77
|
-
well-formedness constraint: Legal Character.
|
78
|
-
Any other well-formedness constraints are not checked.
|
79
|
-
|
80
|
-
XMLScan::XMLScanner skips an internal DTD subset.
|
81
|
-
|
82
|
-
|
83
|
-
== Conformance of XMLScan::XMLParser
|
84
|
-
|
85
|
-
The goal of XMLScan::XMLParser is to satisfy almost all
|
86
|
-
conditions required to a non-validating XML parser.
|
87
|
-
|
88
|
-
The description for XMLScan::XMLScanner about `strict_char'
|
89
|
-
option and the description for UTF-16 are applicable to
|
90
|
-
XMLScan::XMLParser. The following well-formedness constraints
|
91
|
-
about a character reference are checked only if `strict_char'
|
92
|
-
option is specified;
|
93
|
-
|
94
|
-
* Well-formedness constraint: Legal Character
|
95
|
-
|
96
|
-
XMLScan::XMLScanner doesn't normalize linebreaks.
|
97
|
-
|
98
|
-
XMLScan::XMLParser skips an internal DTD subset. The following
|
99
|
-
well-formedness constraints about an internal DTD subset are
|
100
|
-
not checked;
|
101
|
-
|
102
|
-
* Well-formedness constraint: PEs in Internal Subset
|
103
|
-
* Well-formedness constraint: PE Between Declarations
|
104
|
-
* Well-formedness constraint: No External Entity References
|
105
|
-
* Well-formedness constraint: Entity Declared
|
106
|
-
* Well-formedness constraint: Parsed Entity
|
107
|
-
* Well-formedness constraint: No Recursion
|
108
|
-
* Well-formedness constraint: In DTD
|
109
|
-
|
110
|
-
All general entity references except ones to predefined entities
|
111
|
-
(lt,gt,amp,quot,apos) are reported as ones to undeclared entities.
|
112
|
-
|
113
|
-
External DTD subsets are not read. The following well-formedness
|
114
|
-
constraints about an external DTD subset are not checked;
|
115
|
-
|
116
|
-
* Well-formedness constraint: External Subset
|
117
|
-
|
118
|
-
Since XMLScan::XMLParser cannot check whether a replacement text
|
119
|
-
of an undeclared entity includes `<', the following
|
120
|
-
well-formedness constraints are not checked completely;
|
121
|
-
|
122
|
-
* Well-formedness constraint: No < in Attribute Values
|
123
|
-
|
124
|
-
|
125
|
-
== Conformance of XMLScan::XMLNamespace
|
126
|
-
|
127
|
-
XMLScan::XMLNamespace checks for all constraints specified in
|
128
|
-
``Namespaces in XML'' and its errata ((<[Namespaces]>)), and
|
129
|
-
ensure that an XML document is namespace-well-formed.
|
130
|
-
|
131
|
-
All limitations for XMLScan::XMLParser are inherited to
|
132
|
-
XMLScan::XMLNamespace.
|
133
|
-
|
134
|
-
|
135
|
-
== References
|
136
|
-
|
137
|
-
: [XML]
|
138
|
-
W3C (World Wide Web Consortium).
|
139
|
-
Extensible Markup Language (XML) 1.0 (Second Edition),
|
140
|
-
January 2000.
|
141
|
-
((<URL:http://www.w3.org/TR/2000/REC-xml-20001006>))
|
142
|
-
|
143
|
-
: [Namespaces]
|
144
|
-
W3C (World Wide Web Consortium).
|
145
|
-
Namespaces in XML,
|
146
|
-
January 1999.
|
147
|
-
((<URL:http://www.w3.org/TR/1999/REC-xml-names-19990114>)).
|
148
|
-
Important corrections are found at
|
149
|
-
((<URL:http://www.w3.org/XML/xml-names-19990114-errata>)).
|
150
|
-
|
151
|
-
|
152
|
-
=end
|