rgen 0.3.0 → 0.4.0

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 (145) hide show
  1. data/CHANGELOG +20 -1
  2. data/MIT-LICENSE +1 -1
  3. data/README +12 -9
  4. data/lib/instantiators/ea_instantiator.rb +36 -0
  5. data/lib/metamodels/uml13_metamodel.rb +559 -0
  6. data/lib/metamodels/uml13_metamodel_ext.rb +26 -0
  7. data/lib/mmgen/metamodel_generator.rb +5 -5
  8. data/lib/mmgen/mm_ext/ecore_ext.rb +95 -0
  9. data/lib/mmgen/mmgen.rb +6 -4
  10. data/lib/mmgen/templates/annotations.tpl +37 -0
  11. data/lib/mmgen/templates/metamodel_generator.tpl +171 -0
  12. data/lib/rgen/ecore/ecore.rb +190 -0
  13. data/lib/rgen/ecore/ecore_instantiator.rb +25 -0
  14. data/lib/rgen/ecore/ecore_transformer.rb +85 -0
  15. data/lib/rgen/environment.rb +9 -24
  16. data/lib/rgen/find_helper.rb +68 -0
  17. data/lib/rgen/{instantiator.rb → instantiator/abstract_instantiator.rb} +6 -2
  18. data/lib/rgen/instantiator/abstract_xml_instantiator.rb +59 -0
  19. data/lib/rgen/instantiator/default_xml_instantiator.rb +117 -0
  20. data/lib/rgen/instantiator/ecore_xml_instantiator.rb +144 -0
  21. data/lib/rgen/instantiator/nodebased_xml_instantiator.rb +157 -0
  22. data/lib/rgen/instantiator/xmi11_instantiator.rb +164 -0
  23. data/lib/rgen/metamodel_builder.rb +103 -9
  24. data/lib/rgen/metamodel_builder/build_helper.rb +26 -4
  25. data/lib/rgen/metamodel_builder/builder_extensions.rb +285 -88
  26. data/lib/rgen/metamodel_builder/builder_runtime.rb +7 -1
  27. data/lib/rgen/metamodel_builder/data_types.rb +67 -0
  28. data/lib/rgen/metamodel_builder/intermediate/annotation.rb +30 -0
  29. data/lib/rgen/metamodel_builder/metamodel_description.rb +232 -0
  30. data/lib/rgen/metamodel_builder/mm_multiple.rb +23 -0
  31. data/lib/rgen/metamodel_builder/module_extension.rb +33 -0
  32. data/lib/rgen/model_comparator.rb +56 -0
  33. data/lib/rgen/model_dumper.rb +5 -5
  34. data/lib/rgen/name_helper.rb +17 -1
  35. data/lib/rgen/template_language.rb +148 -28
  36. data/lib/rgen/template_language/directory_template_container.rb +56 -38
  37. data/lib/rgen/template_language/output_handler.rb +93 -77
  38. data/lib/rgen/template_language/template_container.rb +186 -143
  39. data/lib/rgen/transformer.rb +19 -14
  40. data/lib/transformers/uml13_to_ecore.rb +75 -0
  41. data/redist/xmlscan/ChangeLog +1301 -0
  42. data/redist/xmlscan/README +34 -0
  43. data/redist/xmlscan/THANKS +11 -0
  44. data/redist/xmlscan/doc/changes.html +74 -0
  45. data/redist/xmlscan/doc/changes.rd +80 -0
  46. data/redist/xmlscan/doc/en/conformance.html +136 -0
  47. data/redist/xmlscan/doc/en/conformance.rd +152 -0
  48. data/redist/xmlscan/doc/en/manual.html +356 -0
  49. data/redist/xmlscan/doc/en/manual.rd +402 -0
  50. data/redist/xmlscan/doc/ja/conformance.ja.html +118 -0
  51. data/redist/xmlscan/doc/ja/conformance.ja.rd +134 -0
  52. data/redist/xmlscan/doc/ja/manual.ja.html +325 -0
  53. data/redist/xmlscan/doc/ja/manual.ja.rd +370 -0
  54. data/redist/xmlscan/doc/src/Makefile +41 -0
  55. data/redist/xmlscan/doc/src/conformance.rd.src +256 -0
  56. data/redist/xmlscan/doc/src/langsplit.rb +110 -0
  57. data/redist/xmlscan/doc/src/manual.rd.src +614 -0
  58. data/redist/xmlscan/install.rb +41 -0
  59. data/redist/xmlscan/lib/xmlscan/encoding.rb +311 -0
  60. data/redist/xmlscan/lib/xmlscan/htmlscan.rb +289 -0
  61. data/redist/xmlscan/lib/xmlscan/namespace.rb +352 -0
  62. data/redist/xmlscan/lib/xmlscan/parser.rb +299 -0
  63. data/redist/xmlscan/lib/xmlscan/scanner.rb +1109 -0
  64. data/redist/xmlscan/lib/xmlscan/version.rb +22 -0
  65. data/redist/xmlscan/lib/xmlscan/visitor.rb +158 -0
  66. data/redist/xmlscan/lib/xmlscan/xmlchar.rb +441 -0
  67. data/redist/xmlscan/memo/CONFORMANCE +1249 -0
  68. data/redist/xmlscan/memo/PRODUCTIONS +195 -0
  69. data/redist/xmlscan/memo/contentspec.ry +335 -0
  70. data/redist/xmlscan/samples/chibixml.rb +105 -0
  71. data/redist/xmlscan/samples/getxmlchar.rb +122 -0
  72. data/redist/xmlscan/samples/rexml.rb +159 -0
  73. data/redist/xmlscan/samples/xmlbench.rb +88 -0
  74. data/redist/xmlscan/samples/xmlbench/parser/chibixml.rb +22 -0
  75. data/redist/xmlscan/samples/xmlbench/parser/nqxml.rb +29 -0
  76. data/redist/xmlscan/samples/xmlbench/parser/rexml.rb +62 -0
  77. data/redist/xmlscan/samples/xmlbench/parser/xmlparser.rb +22 -0
  78. data/redist/xmlscan/samples/xmlbench/parser/xmlscan-0.0.10.rb +62 -0
  79. data/redist/xmlscan/samples/xmlbench/parser/xmlscan-chibixml.rb +22 -0
  80. data/redist/xmlscan/samples/xmlbench/parser/xmlscan-rexml.rb +22 -0
  81. data/redist/xmlscan/samples/xmlbench/parser/xmlscan.rb +99 -0
  82. data/redist/xmlscan/samples/xmlbench/xmlbench-lib.rb +116 -0
  83. data/redist/xmlscan/samples/xmlconftest.rb +200 -0
  84. data/redist/xmlscan/test.rb +7 -0
  85. data/redist/xmlscan/tests/deftestcase.rb +73 -0
  86. data/redist/xmlscan/tests/runtest.rb +47 -0
  87. data/redist/xmlscan/tests/testall.rb +14 -0
  88. data/redist/xmlscan/tests/testencoding.rb +438 -0
  89. data/redist/xmlscan/tests/testhtmlscan.rb +752 -0
  90. data/redist/xmlscan/tests/testnamespace.rb +457 -0
  91. data/redist/xmlscan/tests/testparser.rb +591 -0
  92. data/redist/xmlscan/tests/testscanner.rb +1749 -0
  93. data/redist/xmlscan/tests/testxmlchar.rb +143 -0
  94. data/redist/xmlscan/tests/visitor.rb +34 -0
  95. data/test/array_extensions_test.rb +2 -2
  96. data/test/ea_instantiator_test.rb +41 -0
  97. data/test/ecore_self_test.rb +53 -0
  98. data/test/environment_test.rb +11 -6
  99. data/test/metamodel_builder_test.rb +404 -245
  100. data/test/metamodel_roundtrip_test.rb +52 -0
  101. data/test/metamodel_roundtrip_test/TestModel.rb +65 -0
  102. data/test/metamodel_roundtrip_test/TestModel_Regenerated.rb +64 -0
  103. data/test/metamodel_roundtrip_test/houseMetamodel.ecore +32 -0
  104. data/test/metamodel_roundtrip_test/houseMetamodel_from_ecore.rb +39 -0
  105. data/test/rgen_test.rb +3 -3
  106. data/test/template_language_test.rb +65 -39
  107. data/test/template_language_test/expected_result.txt +24 -3
  108. data/test/template_language_test/templates/code/array.tpl +11 -0
  109. data/test/template_language_test/templates/content/author.tpl +7 -0
  110. data/test/template_language_test/templates/content/chapter.tpl +1 -1
  111. data/test/template_language_test/templates/root.tpl +17 -8
  112. data/test/template_language_test/testout.txt +24 -3
  113. data/test/testmodel/class_model_checker.rb +119 -0
  114. data/test/{xmi_instantiator_test/testmodel.eap → testmodel/ea_testmodel.eap} +0 -0
  115. data/test/{xmi_instantiator_test/testmodel.xml → testmodel/ea_testmodel.xml} +81 -14
  116. data/test/testmodel/ea_testmodel_partial.xml +317 -0
  117. data/test/testmodel/ecore_model_checker.rb +101 -0
  118. data/test/testmodel/manual_testmodel.xml +22 -0
  119. data/test/testmodel/object_model_checker.rb +67 -0
  120. data/test/transformer_test.rb +18 -10
  121. data/test/xml_instantiator_test.rb +81 -8
  122. data/test/xml_instantiator_test/simple_ecore_model_checker.rb +94 -0
  123. data/test/xml_instantiator_test/simple_xmi_ecore_instantiator.rb +53 -0
  124. data/test/xml_instantiator_test/simple_xmi_metamodel.rb +49 -0
  125. data/test/xml_instantiator_test/simple_xmi_to_ecore.rb +75 -0
  126. metadata +126 -28
  127. data/lib/ea/xmi_class_instantiator.rb +0 -46
  128. data/lib/ea/xmi_helper.rb +0 -26
  129. data/lib/ea/xmi_metamodel.rb +0 -34
  130. data/lib/ea/xmi_object_instantiator.rb +0 -46
  131. data/lib/ea/xmi_to_classmodel.rb +0 -78
  132. data/lib/ea/xmi_to_objectmodel.rb +0 -92
  133. data/lib/mmgen/mm_ext/uml_classmodel_ext.rb +0 -71
  134. data/lib/mmgen/templates/uml_classmodel.tpl +0 -63
  135. data/lib/rgen/xml_instantiator.rb +0 -132
  136. data/lib/uml/objectmodel_instantiator.rb +0 -53
  137. data/lib/uml/uml_classmodel.rb +0 -92
  138. data/lib/uml/uml_objectmodel.rb +0 -65
  139. data/test/metamodel_generator_test.rb +0 -44
  140. data/test/metamodel_generator_test/TestModel.rb +0 -40
  141. data/test/metamodel_generator_test/expected_result.txt +0 -40
  142. data/test/xmi_class_instantiator_test.rb +0 -24
  143. data/test/xmi_instantiator_test/class_model_checker.rb +0 -97
  144. data/test/xmi_object_instantiator_test.rb +0 -65
  145. data/test/xml_instantiator_test/testmodel.xml +0 -7
@@ -0,0 +1,1249 @@
1
+ $Id: CONFORMANCE,v 1.2 2002/12/26 19:27:02 katsu Exp $
2
+
3
+ | English:
4
+ |
5
+ | Original English statements are all quoted from XML 1.0 specification[1],
6
+ | Namespaces in XML[3], and its errata[4]. Japanese statements are almost
7
+ | quoted from the Japanese translation of XML 1.0 specification[2] and
8
+ | modified by me to adapt to the second edition. New constraints added from
9
+ | the second edition and constraints about XML namespaces are translated
10
+ | into Japanese by me.
11
+ |
12
+ | Each line which begins with `==>' at the end of each constraint is
13
+ | displayed whether xmlscan implements that constraint or not.
14
+ |
15
+ | You can suppress Japanese sentences in this way:
16
+ |
17
+ | ruby -ne 'print unless ~/\e/' CONFORMANCE
18
+
19
+
20
+ Japanese / $BF|K\8l(B:
21
+
22
+ $B1Q8l$N86J8$O(B XML 1.0 specification[1], Namespaces in XML[3], $B5Z$S$=$l$N(B
23
+ eratta[4]$B$+$i0zMQ$7$?!#F|K\8lLu$OBgItJ,$r(B XML 1.0 $B$NF|K\8lLu(B[2]$B$+$i0zMQ$7!"(B
24
+ $BBh(B2$BHG$X$NBP1~Ey$N$?$a<c43<j$r2C$($?!#(BXML 1.0 $BBh(B2$BHG$+$i?7$?$K2C$o$C$?@)Ls!"(B
25
+ $B5Z$SL>A06u4V$K4X$9$k@)Ls$NF|K\8lLu$O@[Lu$G$"$k!#(B
26
+
27
+ $B3F@)Ls$NKvHx$K$"$k(B `==>' $B$G;O$^$k9T$O!"8=:_$N(B xmlscan $B$K$*$1$kEv3:@)Ls$N(B
28
+ $B<BAu>u67$r<($9!#(B
29
+
30
+ $B<!$N$h$&$K$9$l$P1Q8l$NJ8$r1#$9$3$H$,$G$-$k!#(B
31
+
32
+ ruby -ne 'print unless ~/^\|/' CONFORMANCE
33
+
34
+
35
+
36
+ [1] Tim Bray, Jean Paoli, C.M. Sperberg-McQueen, and Eve Maler.
37
+ Extensible Markup Language (XML) 1.0 (Second Edition) Review Version.
38
+ World Wide Web Consortium, 2000.
39
+ (URL: http://www.w3.org/TR/2000/REC-xml-20001006-review.html)
40
+
41
+ [2] $BF|K\5,3J6(2q(B INSTAC S-WG $BLu(B $B!X3HD%2DG=$J%^!<%/IU$18@8l(B (XML) 1.0$B!Y(B
42
+ (URL: http://www.fxis.co.jp/DMS/sgml/xml/wrapper-xml-19980210.html)
43
+
44
+ [3] Tim Bray, Dave Hollander, Andrew Layman. Namespaces in XML.
45
+ World Wide Web Consortium, 1999.
46
+ (URL: http://www.w3.org/TR/1999/REC-xml-names-19990114/)
47
+
48
+ [4] Namespaces in XML Errata, 29 April 2002. World Wide Web Consortium.
49
+ (URL: http://www.w3.org/XML/xml-names-19990114-errata)
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+ | 2.1 Well-Formed XML Documents
58
+ |
59
+ | [Definition: A textual object is a well-formed XML document if:]
60
+ |
61
+ | 1. Taken as a whole, it matches the production labeled document.
62
+ | 2. It meets all the well-formedness constraints given in this specification.
63
+ | 3. Each of the parsed entities which is referenced directly or indirectly
64
+ | within the document is well-formed.
65
+
66
+ 2.1 $B@07A<0$N(BXML$BJ8=q(B
67
+
68
+ [Definition: $B$"$k%F%-%9%H%*%V%8%'%/%H$,!"<!$N>r7o$rK~$?$9$H$-!"(B
69
+ $B$=$N%F%-%9%H%*%V%8%'%/%H$r@07A<0$N(BXML$BJ8=q$H8F$V!#(B]
70
+
71
+ a) $BA4BN$H$7$F!"(Bdocument$B$H$$$&%i%Y%k$r$b$D@8@.5,B'$K%^%C%A$9$k!#(B
72
+ b) $B$3$NI8=`>pJs(B(TR)$B$GDj5A$9$k$9$Y$F$N@07A<0@)Ls$K=>$&!#(B
73
+ c) $BJ8=qFb$GD>@\E*$^$?$O4V@\E*$K;2>H$5$l$k$=$l$>$l$N2r@OBP>]<BBN$,@07A<0$H(B
74
+ $B$J$k!#(B
75
+
76
+
77
+
78
+
79
+ | [Definition: Validating processors must[INS:[E21], at user option,:INS]
80
+ | report violations of the constraints expressed by the declarations in the
81
+ | DTD, and failures to fulfill the validity constraints given in this
82
+ | specification.] To accomplish this, validating XML processors must read and
83
+ | process the entire DTD and all external parsed entities referenced in the
84
+ | document.
85
+ |
86
+ | Non-validating processors are required to check only the document entity,
87
+ | including the entire internal DTD subset, for well-formedness. [Definition:
88
+ | While they are not required to check the document for validity, they are
89
+ | required to process all the declarations they read in the internal DTD subset
90
+ | and in any parameter entity that they read, up to the first reference to a
91
+ | parameter entity that they do not read; that is to say, they must use the
92
+ | information in those declarations to normalize attribute values, include the
93
+ | replacement text of internal entities, and supply default attribute values.]
94
+ | [INS:[E33]Except when standalone="yes",:INS] they must not process entity
95
+ | declarations or attribute-list declarations encountered after a reference
96
+ | to a parameter entity that is not read, since the entity may have contained
97
+ | overriding declarations.
98
+
99
+ [Definition: $BBEEv@-$r8!>Z$9$k%W%m%;%5$O!"(B[INS:$B%f!<%6$N%*%W%7%g%s;XDj$K(B
100
+ $B$h$C$F$O!"(B:INS]DTD$BFb$N@k8@$K$h$C$F<($5$l$?@)Ls$X$N0cH?$H!"$3$NI8=`>pJs(B
101
+ (TR)$B$,5,Dj$9$kBEEv@-@)Ls$X$N0cH?$H$r!"$9$Y$FJs9p$7$J$1$l$P$J$i$J$$!#(B]
102
+ $B$3$l$r<B8=$9$k$?$a$K!"BEEv@-$r8!>Z$9$k(BXML$B%W%m%;%5$O!"(BDTD$BA4BN$HJ8=qFb$G(B
103
+ $B;2>H$5$l$F$$$k$9$Y$F$N30It2r@OBP>]<BBN$H$rFI$_9~$s$G=hM}$7$J$1$l$P$J$i$J$$!#(B
104
+
105
+ $BBEEv@-$r8!>Z$7$J$$%W%m%;%5$O!"@07A<0$G$"$k$3$H$r3NG'$9$k$?$a$K!"(B
106
+ DTD$B$NFbIt%5%V%;%C%HA4BN$r4^$a$?J8=q<BBN$rD4$Y$k$3$H$@$1$,5AL3$E$1$i$l$F$$$k!#(B
107
+ [Definition: $BJ8=q$NBEEv@-$r3NG'$9$kI,MW$O$J$$$,!"FI$_9~$s$G$$$J$$(B
108
+ $B%Q%i%a%?<BBN$X$N;2>H$,:G=i$K5/$-$k$^$G$KFI$_9~$s$@(BDTD$B$NFbIt%5%V%;%C%H$H(B
109
+ $B%Q%i%a%?<BBN$H$K8=$l$k$9$Y$F$N@k8@$r=hM}$7$J$1$l$P$J$i$J$$!#(B
110
+ $B$9$J$o$A!"B0@-CM$r@55,2=$7!"FbIt<BBN$NCV49%F%-%9%H$r<h9~$_!"(B
111
+ $B%G%U%)%k%H$NB0@-CM$rM?$($k$?$a$K!"$3$l$i$N@k8@$K$"$k>pJs$r;HMQ$7$J$1$l$P(B
112
+ $B$J$i$J$$!#(B]
113
+ [INS:standalone="yes" $B$G$"$k>l9g$r=|$-!"(B:INS]$B<BBN$N@k8@$O>e=q$-$5$l$k(B
114
+ $B2DG=@-$,$"$k$N$G!"BEEv@-$r8!>Z$7$J$$%W%m%;%5$O!"FI$_9~$s$G$$$J$$(B
115
+ $B%Q%i%a%?<BBN$X$N;2>H$h$j8e$K8=$l$?<BBN@k8@5Z$SB0@-%j%9%H@k8@$r=hM}$7$F$O(B
116
+ $B$J$i$J$$!#(B
117
+
118
+
119
+
120
+
121
+
122
+
123
+ | [INS:Parameter entity references are recognized anywhere in the DTD
124
+ | (internal and external subsets and external parameter entities), except
125
+ | in literals, processing instructions, comments, and the contents of
126
+ | ignored conditional sections (see 3.4 Conditional Sections). They are also
127
+ | recognized in entity value literals. The use of parameter entities in the
128
+ | internal subset is restricted as described below.:INS]
129
+
130
+ [INS:$B%Q%i%a%?<BBN;2>H$O%j%F%i%k!"=hM}L?Na!"%3%a%s%H!"5Z$SL5;k$5$l$k(B
131
+ $B>r7oIU$-%;%/%7%g%s(B ($B!V(B3.4 $B>r7oIU$-%;%/%7%g%s!W;2>H(B) $B$r=|$-!"(BDTD
132
+ ($BFbIt(BDTD$B%5%V%;%C%H5Z$S30It%Q%i%a%?<BBN(B) $B$NCf$N$I$3$G$bG'<1$5$l$k!#(B
133
+ $B$^$?!"%j%F%i%k<BBNCM$NCf$G$bG'<1$5$l$k!#FbIt%5%V%;%C%HFb$G$N(B
134
+ $B%Q%i%a%?<BBN$N;H$$J}$O8e=R$9$k$h$&$K@)8B$5$l$k!#(B:INS]
135
+
136
+
137
+
138
+
139
+ == $B%Q%i%a%?<BBN$K4X$9$k%a%b(B
140
+
141
+ SGML $B$G$O(B:
142
+
143
+ $B%Q%i%a%?<BBN;2>H3+;O6h@Z$j;R(B % $B$O(B
144
+ * DSM $B!D(B $B@k8@ItJ,=89gKt$O$=$NCf$N%^!<%/6h4V@k8@$N%^!<%/@k8@$NCf(B
145
+ * GRP $B!D(B $B72$NCf(B
146
+ * MD $B!D(B $B%^!<%/@k8@$NCf(B
147
+ * LIT $B!D(B $BI=5-$NCf(B
148
+ $B$GG'CN$9$k!#(B
149
+
150
+ $B0z?t<BBN;2>H$O!"(B
151
+ * $B0z?tJ,N%;R(Bps
152
+ * $B0z?tI=5-(B
153
+ * $B72(B
154
+ * $B@k8@J,N%;R(Bds
155
+ $B$NJ8L.$K8=$l$k!#(B
156
+
157
+ XML $B$NMQ8l$KK]Lu$9$k$H(B:
158
+
159
+ $B%Q%i%a%?<BBN;2>H3+;O6h@Z$j;R(B % $B$O(B
160
+ * DSM $B!D(B DTD$B%5%V%;%C%HKt$O$=$NCf$N>r7oIU$-%;%/%7%g%s$N%-!<%o!<%I(B
161
+ * GRP $B!D(B $BFbMF%b%G%k$NCf(B
162
+ * MD $B!D(B $B%^!<%/IU$1@k8@$NCf(B
163
+ * LIT $B!D(B $B%j%F%i%k$NCf(B
164
+ $B$GG'CN$7!"(B
165
+ * ($B>r7oIU$-%;%/%7%g%s$b4^$_(B)$B%^!<%/IU$1@k8@Fb$N0z?t$N4V(B
166
+ * $B%j%F%i%k<BBNCM(B
167
+ * $BFbMF%b%G%k(B
168
+ * $B%^!<%/IU$1@k8@$N4V(B
169
+ $B$NJ8L.$K8=$l$k!#(B
170
+
171
+ $B!D$H$$$&$3$H$+$J!)(B
172
+
173
+
174
+
175
+
176
+
177
+
178
+ | Well-formedness constraint: PEs in Internal Subset
179
+ |
180
+ | In the internal DTD subset, parameter-entity references can occur only where
181
+ | markup declarations can occur, not within markup declarations. (This does not
182
+ | apply to references that occur in external parameter entities or to the
183
+ | external subset.)
184
+
185
+ Well-formedness constraint: $BFbIt%5%V%;%C%HFb$N%Q%i%a%?<BBN(B
186
+
187
+ DTD$B$NFbIt%5%V%;%C%H$G$O!"%Q%i%a%?<BBN;2>H$O!"%^!<%/IU$1@k8@$,=P8=2DG=$J(B
188
+ $B>l=j$@$1$K=P8=$G$-$k!#%^!<%/IU$1@k8@$N0lIt$H$7$F$O=P8=$G$-$J$$!#$3$N@)Ls$O(B
189
+ $B30It%Q%i%a%?<BBNKt$O30It%5%V%;%C%H$G$N;2>H$K$OE,MQ$7$J$$!#(B
190
+
191
+ ==> Not Implemented.
192
+
193
+
194
+
195
+
196
+ | [INS:
197
+ | Well-formedness constraint: [E109]External Subset
198
+ |
199
+ | The external subset, if any, must match the production for extSubset.
200
+ | :INS]
201
+
202
+ [INS:
203
+ Well-formedness constraint: $B30It%5%V%;%C%H(B
204
+
205
+ $B30It%5%V%;%C%H$O!"(BextSubset $B$K%^%C%A$7$J$1$l$P$J$i$J$$!#(B
206
+ :INS]
207
+
208
+ ==> Not Implemented.
209
+
210
+
211
+
212
+
213
+ | [INS:
214
+ | Well-formedness constraint: [E109]PE Between Declarations
215
+ |
216
+ | The replacement text of a parameter entity reference in a DeclSep
217
+ | must match the production extSubsetDecl.
218
+ | :INS]
219
+
220
+ [INS:
221
+ Well-formedness constraint: $B@k8@4V$N%Q%i%a%?<BBN(B
222
+
223
+ DeclSep $BCf$N%Q%i%a%?<BBN;2>H$NCV49%F%-%9%H$O(B extSubsetDecl $B$K(B
224
+ $B%^%C%A$7$J$1$l$P$J$i$J$$!#(B
225
+ :INS]
226
+
227
+ ==> Not Implemented.
228
+
229
+
230
+
231
+
232
+ | Well-formedness constraint: Element Type Match
233
+ |
234
+ | The Name in an element's end-tag must match the element type in the
235
+ | start-tag.
236
+
237
+ Well-formedness constraint: $BMWAG7?$N%^%C%A(B
238
+
239
+ $BMWAG$N=*N;%?%0$NL>A0$O!"$=$NMWAG$N3+;O%?%0$K$*$1$kMWAG7?(B ($B$NL>A0(B) $B$H(B
240
+ $B%^%C%A$7$J$1$l$P$J$i$J$$!#(B
241
+
242
+ ==> Implemented in XMLScan::XMLParser.
243
+
244
+
245
+
246
+
247
+ | Well-formedness constraint: Unique Att Spec
248
+ |
249
+ | No attribute name may appear more than once in the same start-tag or
250
+ | empty-element tag.
251
+
252
+ Well-formedness constraint: $BB0@-;XDj$N0l0U@-(B
253
+
254
+ $B3+;O%?%0Kt$O6uMWAG%?%0$G$O!"F10l$NB0@-L>$,Fs2s0J>e=P8=$7$F$O$J$i$J$$!#(B
255
+
256
+ ==> Implemented in XMLScan::XMLParser.
257
+
258
+
259
+
260
+
261
+ | Well-formedness constraint: No External Entity References
262
+ |
263
+ | Attribute values cannot contain direct or indirect entity references to
264
+ | external entities.
265
+
266
+ Well-formedness constraint: $B30It<BBN$X$N;2>H$,$J$$$3$H(B
267
+
268
+ $BB0@-CM$K$O!"30It<BBN$X$ND>@\E*Kt$O4V@\E*$J;2>H$r4^$`$3$H$O$G$-$J$$!#(B
269
+
270
+ ==> Not Implemented.
271
+
272
+
273
+
274
+
275
+ | Well-formedness constraint: No < in Attribute Values
276
+ |
277
+ | The replacement text of any entity referred to directly or indirectly in an
278
+ | attribute value [DEL:(*1):DEL] must not contain a <.
279
+ |
280
+ | (*1) (other than "&lt;")
281
+
282
+ Well-formedness constraint: $BB0@-CM$K(B < $B$r4^$^$J$$$3$H(B
283
+
284
+ $BB0@-CMFb$GD>@\E*Kt$O4V@\E*$K;2>H$9$k<BBN(B [DEL:(*1):DEL] $B$NCV49%F%-%9%H(B
285
+ $B$K$O!"(B< $B$r4^$s$G$O$J$i$J$$!#(B
286
+
287
+ (*1) ("&lt;"$B$r=|$/!#(B)
288
+
289
+ ==> Partially Implemented in XMLScan::XMLScanner.
290
+
291
+
292
+
293
+
294
+ | Well-formedness constraint: Legal Character
295
+ |
296
+ | Characters referred to using character references must match the production
297
+ | for Char.
298
+
299
+ Well-formedness constraint: $B;HMQ$G$-$kJ8;z(B
300
+
301
+ $BJ8;z;2>H$G;2>H$9$kJ8;z$O!"(BChar$B$N@8@.5,B'$K%^%C%A$7$J$1$l$P$J$i$J$$!#(B
302
+
303
+ ==> Not Implemented.
304
+
305
+
306
+
307
+
308
+ | Well-formedness constraint: Entity Declared
309
+ |
310
+ | In a document without any DTD, a document with only an internal DTD subset
311
+ | which contains no parameter entity references, or a document with
312
+ | "standalone='yes'", [UPD:[E34]for an entity reference that does not occur
313
+ | within the external subset or a parameter entity, the Name given in the
314
+ | entity reference must match that in an entity declaration that does not occur
315
+ | within the external subset or a parameter entity:UPD], except that
316
+ | well-formed documents need not declare any of the following entities: amp,
317
+ | lt, gt, apos, quot. [DEL:(*1):DEL] The declaration of a general entity
318
+ | must precede any reference to it which appears in a default value in
319
+ | an attribute-list declaration.
320
+ |
321
+ | Note that if entities are declared in the external subset or in external
322
+ | parameter entities, a non-validating processor is not obligated to read and
323
+ | process their declarations; for such documents, the rule that an entity
324
+ | must be declared is a well-formedness constraint only if standalone='yes'.
325
+ |
326
+ | (*1) [E29]The declaration of a parameter entity must precede
327
+ | any reference to it. Similarly,
328
+
329
+ Well-formedness constraint: $B<BBN$,@k8@$5$l$F$$$k$3$H(B
330
+
331
+ DTD$B$r$b$?$J$$J8=q!"%Q%i%a%?<BBN;2>H$r4^$^$J$$FbIt(BDTD$B%5%V%;%C%H$@$1$r$b$DJ8=q!"(B
332
+ $BKt$O(B "standalone='yes'" $B$r$b$DJ8=q$K$*$$$F!"(B[UPD:$B30It%5%V%;%C%HKt$O(B
333
+ $B%Q%i%a%?<BBNFb$K8=$l$J$$<BBN;2>H$GMQ$$$k(B Name $B$O!"30It%5%V%;%C%HKt$O(B
334
+ $B%Q%i%a%?<BBNFb$K8=$l$J$$<BBN@k8@$H%^%C%A$7$J$1$l$P$J$i$J$$!#(B:UPD]
335
+ $B$?$@$7!"@07A<0$NJ8=q$O!"<BBN(B amp, lt, gt, apos, quot $B$r@k8@$9$kI,MW$O$J$$!#(B
336
+ [DEL:(*1):DEL] $B0lHL<BBN$N>l9g$O!"B0@-%j%9%H@k8@$N%G%U%)%k%HCMFb$G$N;2>H$h$j(B
337
+ $B@h$K!"@k8@$,8=$l$J$1$l$P$J$i$J$$!#(B
338
+
339
+ $B30It%5%V%;%C%HKt$O30It%Q%i%a%?<BBN$G<BBN$r@k8@$9$k$H$-!"BEEv@-$r8!>Z$7$J$$(B
340
+ $B%W%m%;%5$,!"@k8@$rFI$_!"=hM}$9$k$3$H$r5AL3$E$1$J$$$3$H$KCm0U!#(B
341
+ $B$=$l$i$NJ8=q$G$O!"<BBN$O@k8@$5$l$J$1$l$P$J$i$J$$$H$$$&5,B'$O!"(B
342
+ standalone='yes' $B$N>l9g$N$_!"@07A<0@)Ls$H$J$k!#(B
343
+
344
+ (*1) $B%Q%i%a%?<BBN$N>l9g$O!"@k8@$O!";2>H$K@h9T$7$J$1$l$P$J$i$J$$!#F1MM$K(B
345
+
346
+ ==> Not Implemented.
347
+
348
+
349
+
350
+
351
+ | Well-formedness constraint: Parsed Entity
352
+ |
353
+ | An entity reference must not contain the name of an unparsed entity. Unparsed
354
+ | entities may be referred to only in attribute values declared to be of type
355
+ | ENTITY or ENTITIES.
356
+
357
+ Well-formedness constraint: $B2r@OBP>]<BBN(B
358
+
359
+ $B<BBN;2>H$O!"2r@OBP>]30<BBN$NL>A0$r4^$s$G$$$F$O$J$i$J$$!#2r@OBP>]30<BBN$O!"(B
360
+ ENTITY $B7?Kt$O(B ENTITIES $B7?$H$7$F@k8@$7$?B0@-CM$H$7$F$@$1;2>H$G$-$k!#(B
361
+
362
+ ==> Not Implemented.
363
+
364
+
365
+
366
+
367
+ | Well-formedness constraint: No Recursion
368
+ |
369
+ | A parsed entity must not contain a recursive reference to itself, either
370
+ | directly or indirectly.
371
+
372
+ Well-formedness constraint: $B:F5"$J$7(B
373
+
374
+ $B2r@OBP>]<BBN$O!"$=$l<+BN$X$N;2>H$r!"D>@\$K$b4V@\$K$b4^$s$G$O$J$i$J$$!#(B
375
+
376
+ ==> Not Implemented.
377
+
378
+
379
+
380
+
381
+ | Well-formedness constraint: In DTD
382
+ |
383
+ | Parameter-entity references may only appear in the DTD.
384
+
385
+ Well-formedness constraint: DTD $B$NCf(B
386
+
387
+ $B%Q%i%a%?<BBN;2>H$O!"(BDTD $BFb$K$@$1!"=P8=$7$F$h$$!#(B
388
+
389
+ ==> Not Implemented.
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+ | Validity constraint: Root Element Type
400
+ |
401
+ | The Name in the document type declaration must match the element type
402
+ | of the root element.
403
+
404
+ Validity constraint: $B%k!<%HMWAG7?(B
405
+
406
+ $BJ8=q7?@k8@$K$*$1$k(BName$B$O!"%k!<%HMWAG$N7?$H%^%C%A$7$J$1$l$P$J$i$J$$!#(B
407
+
408
+ ==> Not Implemented.
409
+
410
+
411
+
412
+
413
+ | Validity constraint: Proper Declaration/PE Nesting
414
+ |
415
+ | Parameter-entity replacement text must be properly nested with markup
416
+ | declarations. That is to say, if either the first character or the last
417
+ | character of a markup declaration (markupdecl above) is contained in the
418
+ | replacement text for a parameter-entity reference, both must be contained in
419
+ | the same replacement text.
420
+
421
+ Validity constraint: $B@k8@5Z$S%Q%i%a%?<BBN$,87L)$KF~$l;R$r$J$9$3$H(B
422
+
423
+ $B%Q%i%a%?<BBN$NCV49%F%-%9%H$O!"%^!<%/IU$1@k8@Fb$K$*$$$F!"87L)$K(B
424
+ $BF~$l;R$K$J$C$F$$$J$1$l$P$J$i$J$$!#$D$^$j!"%^!<%/IU$1@k8@(B(markupdecl)$B$N(B
425
+ $B:G=iKt$O:G8e$NJ8;z$,!"%Q%i%a%?<BBN;2>H$N;X$7<($9CV49%F%-%9%H$K4^$^$l$l$P!"(B
426
+ $BN>J}$H$bF1$8CV49%F%-%9%H$K4^$^$l$J$1$l$P$J$i$J$$!#(B
427
+
428
+ ==> Not Implemented.
429
+
430
+
431
+
432
+
433
+ | Validity constraint: Standalone Document Declaration
434
+ |
435
+ | The standalone document declaration must have the value "no" if any external
436
+ | markup declarations contain declarations of:
437
+ |
438
+ | a) attributes with default values, if elements to which these attributes
439
+ | apply appear in the document wi thout specifications of values for these
440
+ | attributes, or
441
+ |
442
+ | b) entities (other than amp, lt, gt, apos, quot), if references to those
443
+ | entities appear in the document, or
444
+ |
445
+ | c) attributes with values subject to normalization, where the attribute
446
+ | appears in the document with a value which will change as a result of
447
+ | normalization, or
448
+ |
449
+ | d) element types with element content, if white space occurs directly within
450
+ | any instance of those types.
451
+
452
+ Validity constraint: $B%9%?%s%I%"%m%sJ8=q@k8@(B
453
+
454
+ $B%9%?%s%I%"%m%sJ8=q@k8@$O!"2?$i$+$N30It%^!<%/IU$1@k8@$,<!$N$$$:$l$+$r(B
455
+ $B@k8@$7$F$$$k$H$-$O!"CM(B "no" $B$r<h$i$J$1$l$P$J$i$J$$!#(B
456
+
457
+ a) $B%G%U%)%k%HCMIU$-$NB0@-$G$"$C$F!"$3$NB0@-$,E,MQ$5$l$kMWAG$,(B
458
+ $BB0@-CM$r;XDj$;$:$KJ8=qFb$K8=$l$k$b$N!#(B
459
+ b) amp, lt, gt, apos, quot$B0J30$N<BBN$G$"$C$F!"$=$N<BBN$KBP$9$k(B
460
+ $B;2>H$,J8=qFb$K=P8=$9$k$b$N!#(B
461
+ c) $BCM$,@55,2=$NBP>]$H$J$kB0@-$G$"$C$F!"@55,2=$N7k2L$H$7$FJQ2=$9$kCM$,(B
462
+ $BJ8=qFb$GB0@-$K;XDj$5$l$F$$$k$b$N!#(B
463
+ d) $BMWAGFbMF$r$b$DMWAG7?$G$"$C$F!"6uGr$,$=$NMWAG7?$N$$$:$l$+$N(B
464
+ $B%$%s%9%?%s%9Fb$KD>@\8=$l$k$b$N!#(B
465
+
466
+ ==> Not Implemented.
467
+
468
+
469
+
470
+
471
+ | Validity constraint: Element Valid
472
+ |
473
+ | An element is valid if there is a declaration matching elementdecl where the
474
+ | Name matches the element type, and one of the following holds:
475
+ |
476
+ | 1. The declaration matches EMPTY and the element has no content.
477
+ |
478
+ | 2. The declaration matches children and the sequence of child elements
479
+ | belongs to the language generated by the regular expression in the
480
+ | content model, with optional white space (characters matching the
481
+ | nonterminal S) between [UPD:[E59]the start-tag and the first child
482
+ | element, between child elements, or between the last child element
483
+ | and the end-tag. Note that a CDATA section containing only white space
484
+ | does not match the nonterminal S, and hence cannot appear in these
485
+ | positions.:UPD]
486
+ |
487
+ | 3. The declaration matches Mixed and the content consists of character
488
+ | data and child elements whose types match names in the content model.
489
+ |
490
+ | 4. The declaration matches ANY, and the types of any child elements have
491
+ | been declared.
492
+
493
+ Validity constraint: $BMWAG$NBEEv@-(B
494
+
495
+ $BMWAG$,BEEv$H$O!$$=$NMWAG7?(B ($B$NL>A0(B) $B$H%^%C%A$9$k(BName$B$r$b$D@k8@(B
496
+ (elementdecl$B$K%^%C%A$9$k$b$N(B) $B$,B8:_$7!"$5$i$K<!$N$$$:$l$+$N>r7o$rK~$?$9(B
497
+ $B>l9g$H$9$k!#(B
498
+
499
+ 1. $B@k8@$,(BEMPTY$B$K%^%C%A$7!"MWAG$,FbMF$r$b$?$J$$!#(B
500
+ 2. $B@k8@$,(Bchildren$B$K%^%C%A$7!"MWAG$N;RMWAG$NJB$S$,FbMF%b%G%kCf$N@55,I=8=$K(B
501
+ $B$h$C$F@8@.$5$l$k8@8l$KB0$9$k!#(B[UPD:$B3+;O%?%0$H:G=i$N;RMWAG$N4V!"(B
502
+ $B;RMWAG$N4V!"Kt$O:G8e$N;RMWAG$H=*N;%?%0$N4V$K(B:UPD]$B6uGr(B ($BHs=*C<5-9f(BS$B$K(B
503
+ $B%^%C%A$9$kJ8;z$NJB$S(B) $B$,$"$C$F$b$h$$!#(B[UPD:$B6uGr$N$_$r4^$`(B CDATA
504
+ $B%;%/%7%g%s$OHs=*C<5-9f(BS$B$K%^%C%A$7$J$$$?$a!"$3$l$i$N0LCV$K8=$l$k$3$H$O(B
505
+ $B$G$-$J$$$3$H$KCm0U!#(B:UPD]
506
+ 3. $B@k8@$,(BMixed$B$K%^%C%A$7!"MWAG$NFbMF$,J8;z%G!<%?5Z$S;RMWAG$+$i$J$k!#(B
507
+ $B;RMWAG$NMWAG7?$O!"MWAG$NFbMF%b%G%k$K=P8=$9$kL>A0$K%^%C%A$9$k!#(B
508
+ 4. $B@k8@$,(BANY$B$K%^%C%A$7!"$I$N;RMWAG$NMWAG7?$b@k8@$5$l$F$$$k!#(B
509
+
510
+ ==> Not Implemented.
511
+
512
+
513
+
514
+
515
+ | Validity constraint: Attribute Value Type
516
+ |
517
+ | The attribute must have been declared; the value must be of the type declared
518
+ | for it. (For attribute types, see 3.3 Attribute-List Declarations.)
519
+
520
+ Validity constraint: $BB0@-CM$N7?(B
521
+
522
+ $BB0@-$O@k8@$5$l$F$$$J$1$l$P$J$i$J$$!#B0@-CM$N7?$O!$$=$NB0@-$KBP$7$F(B
523
+ $B@k8@$7$?7?$G$J$1$l$P$J$i$J$$(B ($BB0@-$N7?$K$D$$$F$O!$(B"3.3 $BB0@-%j%9%H@k8@(B"$B$r(B
524
+ $B;2>H(B)$B!#(B
525
+
526
+ ==> Not Implemented.
527
+
528
+
529
+
530
+ | Validity constraint: Unique Element Type Declaration
531
+ |
532
+ | No element type may be declared more than once.
533
+
534
+ Validity constraint: $BMWAG7?@k8@$N0l0U@-(B
535
+
536
+ $B0l$D$NMWAG7?$rFs2s0J>e@k8@$G$-$J$$!#(B
537
+
538
+ ==> Not Implemented.
539
+
540
+
541
+
542
+
543
+ | Validity constraint: Proper Group/PE Nesting
544
+ |
545
+ | Parameter-entity replacement text must be properly nested with [UPD:[E11]
546
+ | parenthesized:UPD] groups. That is to say, if either of the opening or
547
+ | closing parentheses in a choice, seq, or Mixed construct is contained in the
548
+ | replacement text for a parameter entity, both must be contained in the same
549
+ | replacement text.
550
+ |
551
+ | [UPD:[E19]For interoperability, if a parameter-entity reference appears in a
552
+ | choice, seq, or Mixed construct, its replacement text should contain at
553
+ | least one non-blank character, and neither the first nor last non-blank
554
+ | character of the replacement text should be a connector (| or ,).:UPD]
555
+
556
+ Validity constraint: $B%0%k!<%W5Z$S%Q%i%a%?<BBN$,87L)$JF~$l;R$r$J$7$F$$$k$3$H(B
557
+
558
+ $B%Q%i%a%?<BBN$NCV49%F%-%9%H$O!"(B[UPD:$B$+$C$3$G0O$^$l$?(B:UPD]$B%0%k!<%W$K$h$C$F!"(B
559
+ $B87L)$JF~$l;R$r9=@.$7$J$1$l$P$J$i$J$$!#$D$^$j!"A*Br!"NsKt$O:.:_ItIJ$K(B
560
+ $B3+$-$+$C$3Kt$OJD$8$+$C$3$N$$$:$l$+0lJ}$,%Q%i%a%?<BBN$NCV49%F%-%9%H$K(B
561
+ $B4^$l$l$P!"B>J}$bF1$8CV49%F%-%9%H$K4^$^$l$J$1$l$P$J$i$J$$!#(B
562
+
563
+ [UPD:$BAj8_1?MQ@-$N$?$a$K$O!"%Q%i%a%?<BBN;2>H$,A*Br!"NsKt$O:.:_FbMF$K(B
564
+ $B4^$^$l$l$P!"$=$NCV49%F%-%9%H$O>/$J$/$H$b(B1$B$D$NHs6uGrJ8;z$r4^$`$3$H$,(B
565
+ $BK>$^$7$/!"CV49%F%-%9%H$N@hF,5Z$SKvHx$N6uGr$G$J$$J8;z$O!"%3%M%/%?(B
566
+ (| $BKt$O(B ,) $B$G$J$$J}$,$h$$!#(B:UPD]
567
+
568
+ ==> Not Implemented.
569
+
570
+
571
+
572
+
573
+ | Validity constraint: No Duplicate Types
574
+ |
575
+ | The same name must not appear more than once in a single mixed-content
576
+ | declaration.
577
+
578
+ Validity constraint: $BMWAG7?$N=EJ#$N6X;_(B
579
+
580
+ $B0l$D$N:.9gFbMF@k8@Fb$K!"F1$8L>A0$,J#?t2s=P8=$7$F$O$J$i$J$$!#(B
581
+
582
+ ==> Not Implemented.
583
+
584
+
585
+
586
+
587
+ | Validity constraint: ID
588
+ |
589
+ | Values of type ID must match the Name production. A name must not appear more
590
+ | than once in an XML document as a value of this type; i.e., ID values must
591
+ | uniquely identify the elements which bear them.
592
+
593
+ Validity constraint: ID
594
+
595
+ ID$B7?$NCM$O@8@.5,B'(BName$B$K%^%C%A$7$J$1$l$P$J$i$J$$!#0l$D$N(BXML$BJ8=qFb$G$O!"(B
596
+ $B0l$D$NL>A0$,!"$3$N7?$NCM$H$7$FJ#?t2s8=$l$F$O$J$i$J$$!#$D$^$j!"(BID$B$NCM$O(B
597
+ $BMWAG$r0l0U$KFCDj$7$J$1$l$P$J$i$J$$!#(B
598
+
599
+ ==> Not Implemented.
600
+
601
+
602
+
603
+
604
+ | Validity constraint: One ID per Element Type
605
+ |
606
+ | No element type may have more than one ID attribute specified.
607
+
608
+ Validity constraint: 1$BMWAG$4$H$K0l$D$N(BID
609
+
610
+ $BMWAG7?$OJ#?t$N(BID$BB0@-$r$b$C$F$O$J$i$J$$!#(B
611
+
612
+ ==> Not Implemented.
613
+
614
+
615
+
616
+
617
+ | Validity constraint: ID Attribute Default
618
+ |
619
+ | An ID attribute must have a declared default of #IMPLIED or #REQUIRED.
620
+
621
+ Validity constraint: ID$BB0@-$N%G%U%)%k%H(B
622
+
623
+ ID$BB0@-$O!"%G%U%)%k%H$H$7$F(B#IMPLIED$BKt$O(B#REQUIRED$B$r@k8@$7$J$1$l$P$J$i$J$$!#(B
624
+
625
+ ==> Not Implemented.
626
+
627
+
628
+
629
+
630
+ | Validity constraint: IDREF
631
+ |
632
+ | Values of type IDREF must match the Name production, and values of
633
+ | type IDREFS must match Names; each Name must match the value of an ID
634
+ | attribute on some element in the XML document; i.e. IDREF values must
635
+ | match the value of some ID attribute.
636
+
637
+ Validity constraint: IDREF
638
+
639
+ IDREF$B7?$NCM$O@8@.5,B'(BName$B$K%^%C%A$7$J$1$l$P$J$i$J$$!#(BIDREFS$B7?$NCM$O(B
640
+ Names$B$K%^%C%A$7$J$1$l$P$J$i$J$$!#3F!9$N(BName$B$O!"(BXML$BJ8=qFb$KB8:_$9$kMWAG$N(B
641
+ ID$BB0@-$NCM$H%^%C%A$7$J$1$l$P$J$i$J$$!#$D$^$j!"(BIDREF$B$NCM$O(B
642
+ $B$"$k(BID$BB0@-$NCM$H%^%C%A$7$J$1$l$P$J$i$J$$!#(B
643
+
644
+ ==> Not Implemented.
645
+
646
+
647
+
648
+
649
+ | Validity constraint: Entity Name
650
+ |
651
+ | Values of type ENTITY must match the Name production, values of type
652
+ | ENTITIES must match Names; each Name must match the name of an unparsed
653
+ | entity declared in the DTD.
654
+
655
+ Validity constraint: $B<BBNL>(B
656
+
657
+ ENTITY$B7?$NCM$O!"(BName$B@8@.5,B'$K%^%C%A$7$J$1$l$P$J$i$J$$!#(BENTITIES$B7?$NCM$O(B
658
+ Names$B$K%^%C%A$7$J$1$l$P$J$i$J$$!#3F!9$N(BName$B$O!"(BDTD$B$G@k8@$9$k2r@OBP>]30<BBN$H(B
659
+ $B%^%C%A$7$J$1$l$P$J$i$J$$!#(B
660
+
661
+ ==> Not Implemented.
662
+
663
+
664
+
665
+
666
+ | Validity constraint: Name Token
667
+ |
668
+ | Values of type NMTOKEN must match the Nmtoken production; values of type
669
+ | NMTOKENS must match Nmtokens.
670
+
671
+ Validity constraint: $BL>A0%H!<%/%s(B
672
+
673
+ NMTOKEN$B7?$NCM$O!"(BNmtoken$B@8@.5,B'$K%^%C%A$7$J$1$l$P$J$i$J$$!#(BNMTOKENS$B7?$NCM$O(B
674
+ Nmtokens$B$K%^%C%A$7$J$1$l$P$J$i$J$$!#(B
675
+
676
+ ==> Not Implemented.
677
+
678
+
679
+
680
+
681
+ | Validity constraint: Notation Attributes
682
+ |
683
+ | Values of this type must match one of the notation names included in the
684
+ | declaration; all notation names in the declaration must be declared.
685
+
686
+ Validity constraint: $B5-K!B0@-(B
687
+
688
+ $B$3$N7?$NCM$O!"@k8@$K4^$^$l$k4v$D$+$N5-K!$NL>A0$N0l$D$H%^%C%A$7$J$1$l$P(B
689
+ $B$J$i$J$$!#$D$^$j!"@k8@$K4^$^$l$k5-K!L>$O!"$9$Y$F@k8@$5$l$F$$$J$1$l$P$J$i$J$$!#(B
690
+
691
+ ==> Not Implemented.
692
+
693
+
694
+
695
+
696
+ | [INS:
697
+ | Validity constraint: [E7]One Notation Per Element Type
698
+ |
699
+ | No element type may have more than one NOTATION attribute specified.
700
+ | :INS]
701
+
702
+ [INS:
703
+ Validity constraint: 1$BMWAG7?$4$H$K(B1$B$D$N5-K!(B
704
+
705
+ $BMWAG7?$OJ#?t$N(B NOTATION $BB0@-$r$b$C$F$O$J$i$J$$!#(B
706
+ :INS]
707
+
708
+ ==> Not Implemented.
709
+
710
+
711
+
712
+
713
+ | [INS:
714
+ | Validity constraint: [E68]No Notation on Empty Element
715
+ |
716
+ | For compatibility, an attribute of type NOTATION must not be declared on an
717
+ | element declared EMPTY.
718
+ | :INS]
719
+
720
+ [INS:
721
+ Validity constraint: $B6uMWAGCf$K5-K!$r4^$^$J$$$3$H(B
722
+
723
+ $B8_49@-$N$?$a$K!"6uMWAG$H$7$F@k8@$5$l$?MWAG$KBP$7$F!"(BNOTATION $B7?$N(B
724
+ $BB0@-CM$r@k8@$9$k$3$H$O$G$-$J$$!#(B
725
+ :INS]
726
+
727
+ ==> Not Implemented.
728
+
729
+
730
+
731
+
732
+ | Validity constraint: Enumeration
733
+ |
734
+ | Values of this type must match one of the Nmtoken tokens in the declaration.
735
+ |
736
+ | For interoperability, the same Nmtoken should not occur more than once in the
737
+ | enumerated attribute types of a single element type.
738
+
739
+ Validity constraint: $BNs5s(B
740
+
741
+ $B$3$N7?$NCM$O!"@k8@$K4^$^$l$k4v$D$+$N(BNmtoken$B%H!<%/%s$N0l$D$H%^%C%A(B
742
+ $B$7$J$1$l$P$J$i$J$$!#(B
743
+ $BAj8_1?MQ@-$N$?$a$K$O!"F1$8(BNmtoken$B$O!"0l$D$NMWAG7?$N$$$/$D$+$NNs5s7?$N(B
744
+ $BB0@-$H$7$F!"J#?t2s8=$l$J$$J}$,$h$$!#(B
745
+
746
+ ==> Not Implemented.
747
+
748
+
749
+
750
+
751
+ | Validity constraint: Required Attribute
752
+ |
753
+ | If the default declaration is the keyword #REQUIRED, then the attribute
754
+ | must be specified for all elements of the type in the attribute-list
755
+ | declaration.
756
+
757
+ Validity constraint: $BI,?\B0@-(B
758
+
759
+ $B%G%U%)%k%H$N@k8@$,(B#REQUIRED$B%-!<%o!<%I$N>l9g!"B0@-%j%9%H@k8@$G;2>H$7$?(B
760
+ $BMWAG7?$N$9$Y$F$NMWAG$G!"$=$NB0@-$r;XDj$7$J$1$l$P$J$i$J$$!#(B
761
+
762
+ ==> Not Implemented.
763
+
764
+
765
+
766
+
767
+ | Validity constraint: Attribute Default Legal
768
+ |
769
+ | The declared default value must meet the lexical constraints of the
770
+ | declared attribute type.
771
+
772
+ Validity constraint: $BB0@-%G%U%)%k%H$N@5$7$5(B
773
+
774
+ $B@k8@$7$?%G%U%)%k%HCM$O!"@k8@$7$?B0@-7?$N;z6g@)Ls$rK~$?$5$J$1$l$P$J$i$J$$!#(B
775
+
776
+ ==> Not Implemented.
777
+
778
+
779
+
780
+
781
+ | Validity constraint: Fixed Attribute Default
782
+ |
783
+ | If an attribute has a default value declared with the #FIXED keyword,
784
+ | instances of that attribute must match the default value.
785
+
786
+ Validity constraint: $B8GDj$NB0@-%G%U%)%k%H(B
787
+
788
+ $BB0@-$,(B#FIXED$B%-!<%o!<%I$G@k8@$5$l$?%G%U%)%k%HCM$r;}$D>l9g!"$=$NB0@-$N(B
789
+ $B%$%s%9%?%s%9$O%G%U%)%k%HCM$K%^%C%A$7$J$1$l$P$J$i$J$$!#(B
790
+
791
+ ==> Not Implemented.
792
+
793
+
794
+
795
+
796
+ | [INS:
797
+ | Validity constraint: [E90]Proper Conditional Section/PE Nesting
798
+ |
799
+ | If any of the "<![", "[", or "]]>" of a conditional section is contained
800
+ | in the replacement text for a parameter-entity reference, all of them
801
+ | must be contained in the same replacement text.
802
+ |
803
+ | Like the internal and external DTD subsets, a conditional section may
804
+ | contain one or more complete declarations, comments, processing
805
+ | instructions, or nested conditional sections, intermingled with white space.
806
+ | :INS]
807
+
808
+ [INS:
809
+ Validity constraint: $B>r7o%;%/%7%g%s5Z$S%Q%i%a%?<BBN$,87L)$JF~$l;R$r(B
810
+ $B$J$7$F$$$k$3$H(B
811
+
812
+ $B%Q%i%a%?<BBN;2>H$NCV49%F%-%9%H$K>r7o%;%/%7%g%s$N(B "<![", "[", "]]>" $B$N$&$A$N(B
813
+ $B$I$l$+$,4^$^$l$F$$$k>l9g$O!"$=$l$iA4$F$,F1$8CV49%F%-%9%H$K4^$^$l$F$$$J$1$l$P(B
814
+ $B$J$i$J$$!#(B
815
+
816
+ $BFbIt5Z$S30It(B DTD $B%5%V%;%C%H$N$h$&$K!">r7o%;%/%7%g%s$O40A4$J@k8@!"(B
817
+ $B%3%a%s%H!"=hM}L?Na!"Kt$O%M%9%H$5$l$?>r7o%;%/%7%g%s$r!"6uGrJ8;z$H6&$K(B
818
+ 1$B$D0J>e4^$s$G$b$h$$!#(B
819
+ :INS]
820
+
821
+ ==> Not Implemented.
822
+
823
+
824
+
825
+
826
+ | Validity constraint: Entity Declared
827
+ |
828
+ | In a document with an external subset or external parameter entities with
829
+ | "standalone='no'", the Name given in the entity reference must match that
830
+ | in an entity declaration. For interoperability, valid documents should
831
+ | declare the entities amp, lt, gt, apos, quot, in the form specified in 4.6
832
+ | Predefined Entities. The declaration of a parameter entity must precede
833
+ | any reference to it. Similarly, the declaration of a general entity must
834
+ | precede any [UPD:[E92]attribute-list declaration containing a default value
835
+ | with a direct or indirect reference to that general entity.:UPD]
836
+
837
+ Validity constraint: $B<BBN$,@k8@$5$l$F$$$k$3$H(B
838
+
839
+ $B30It%5%V%;%C%HKt$O30It%Q%i%a%?<BBN$r$b$C$F$$$F!"(B"standalone='no'"$B$r(B
840
+ $B$b$DJ8=q$K$*$$$F!"<BBN;2>H$GMQ$$$k(B Name $B$O!"$"$k<BBN@k8@$K4^$^$l$kL>A0$H(B
841
+ $B%^%C%A$7$J$1$l$P$J$i$J$$!#Aj8_1?MQ@-$N$?$a$K$O!"BEEv$JJ8=q$O(B
842
+ "4.6 $BDj5A:Q$_<BBN(B"$B$G;XDj$7$?=q<0$K$h$C$F!"<BBN(B amp, lt, gt, apos, quot$B$r(B
843
+ $B@k8@$9$k$3$H$,K>$^$7$$!#%Q%i%a%?<BBN$N>l9g$O!"@k8@$O!";2>H$K(B
844
+ $B@h9T$7$J$1$l$P$J$i$J$$!#F1MM$K!"0lHL<BBN$N>l9g$O!"(B
845
+ [UPD:$B$=$N0lHL<BBN$X$N;2>H$rD>@\E*Kt$O4V@\E*$K4^$s$G$$$k%G%U%)%k%HCM$r4^$`(B
846
+ $BB0@-%j%9%H@k8@(B:UPD]$B$h$j$b@h$K!"@k8@$,8=$l$J$1$l$P$J$i$J$$!#(B
847
+
848
+ ==> Not Implemented.
849
+
850
+
851
+
852
+
853
+ | Validity constraint: Notation Declared
854
+ |
855
+ | The Name must match the declared name of a notation.
856
+
857
+ Validity constraint: $B5-K!$,@k8@$5$l$F$$$k$3$H(B
858
+ Name $B$O!"@k8@$7$?5-K!$NL>A0$H%^%C%A$7$J$1$l$P$J$i$J$$!#(B
859
+
860
+ ==> Not Implemented.
861
+
862
+
863
+
864
+
865
+ | [INS:
866
+ | Validity constraint: [E22]Unique Notation Name
867
+ |
868
+ | Only one notation declaration can declare a given Name.
869
+ | :INS]
870
+
871
+ [INS:
872
+ Validity constraint: $B5-K!$NL>A0$N0l0U@-(B
873
+
874
+ $BJ#?t$N5-K!@k8@$GF1$8L>A0$r@k8@$G$-$J$$!#(B
875
+ :INS]
876
+
877
+ ==> Not Implemented.
878
+
879
+
880
+
881
+
882
+
883
+
884
+
885
+
886
+
887
+ # from the second edition;
888
+
889
+ | 3.3.3 [E70]Attribute-Value Normalization
890
+ |
891
+ | Before the value of an attribute is passed to the application or checked for
892
+ | validity, the XML processor must normalize the attribute value by applying
893
+ | the algorithm below, or by using some other method such that the value
894
+ | passed to the application is the same as that produced by the algorithm.
895
+ |
896
+ | 1. All line breaks must have been normalized on input to #xA as described in
897
+ | 2.11 End-of-Line Handling, so the rest of this algorithm operates on text
898
+ | normalized in this way.
899
+ |
900
+ | 2. Begin with a normalized value consisting of the empty string.
901
+ |
902
+ | 3. For each character, entity reference, or character reference in the
903
+ | unnormalized attribute value, beginning with the first and continuing to
904
+ | the last, do the following:
905
+ |
906
+ | a) For a character reference, append the referenced character to the
907
+ | normalized value.
908
+ | b) For an entity reference, recursively apply step 3 of this algorithm
909
+ | to the replacement text of the entity.
910
+ | c) For a white space character (#x20, #xD, #xA, #x9), append a space
911
+ | character (#x20) to the normalized value.
912
+ | d) For another character, append the character to the normalized value.
913
+
914
+ 3.3.3 $BB0@-CM$N@55,2=(B
915
+
916
+ $BB0@-$NCM$r%"%W%j%1!<%7%g%s$KEO$9A0!"Kt$OBEEv@-$r8!>Z$9$kA0$K!"(BXML $B%W%m%;%5$O(B
917
+ $B0J2<$N%"%k%4%j%:%`$rE,MQ$7$FB0@-CM$r@55,2=$7$J$1$l$P$J$i$J$$!#Kt$O!"(B
918
+ $B0J2<$N%"%k%4%j%:%`$,@8@.$9$kCM$HF1$8CM$r%"%W%j%1!<%7%g%s$KEO$9B>$NJ}K!$r(B
919
+ $BMQ$$$F@55,2=$7$F$b$h$$!#(B
920
+
921
+ 1. $BF~NO$K4^$^$l$kA4$F$N2~9T$O!"(B"2.11 $B9TKv$N=hM}(B" $B$G=R$Y$i$l$F$$$k$h$&$K(B
922
+ #xA $B$K@55,2=$5$l$J$1$l$P$J$i$J$$!#$h$C$F!"$3$N%"%k%4%j%:%`$N0J9_$N=hM}(B
923
+ $B$G$O!"$3$N$h$&$K$7$F@55,2=$5$l$?%F%-%9%H$r=hM}$NBP>]$H$9$k!#(B
924
+
925
+ 2. $B6uJ8;zNs$+$i$J$k@55,2=$5$l$?CM$+$i;O$a$k!#(B
926
+
927
+ 3. $B@55,2=$5$l$F$$$J$$B0@-CMFb$NJ8;z!"<BBN;2>H!"J8;z;2>H$=$l$>$l$K$D$$$F!"(B
928
+ $B@hF,$+$iKvHx$^$G0J2<$NA`:n$rB3$1$k!#(B
929
+
930
+ a) $BJ8;z;2>H$K$D$$$F$O!";2>HJ8;z$r@55,2=$5$l$?CM$KDI2C$9$k!#(B
931
+ b) $B<BBN;2>H$K$D$$$F$O!"$=$NCV49%F%-%9%H$KBP$7$F$3$N%"%k%4%j%:%`$N(B
932
+ $B%9%F%C%W(B 3 $B$r:F5"E*$KE,MQ$9$k!#(B
933
+ c) $B6uGrJ8;z(B (#x20, #xD, #xA, #x9) $B$K$D$$$F$O!"@55,2=$5$l$?CM$K(B
934
+ $B6uGrJ8;z(B (#x20) $B$rDI2C$9$k!#(B
935
+ d) $B$=$NB>$NJ8;z$K$D$$$F$O!"$=$NJ8;z$r@55,2=$5$l$?CM$KDI2C$9$k!#(B
936
+
937
+ | If the attribute type is not CDATA, then the XML processor must further
938
+ | process the normalized attribute value by discarding any leading and
939
+ | trailing space (#x20) characters, and by replacing sequences of space (#x20)
940
+ | characters by a single space (#x20) character.
941
+
942
+ $BB0@-CM$N7?$,(B CDATA $B$G$J$$>l9g!"(BXML $B%W%m%;%5$O!"$5$i$K!"@55,2=$5$l$?CM$N(B
943
+ $BA08e$N%9%Z!<%9J8;z(B (#x20) $B$r:o=|$7!"O"B3$9$k%9%Z!<%9J8;z(B (#x20) $B$r(B 1$B$D$N(B
944
+ $B%9%Z!<%9J8;z(B (#x20) $B$KCV49$7$J$1$l$P$J$i$J$$!#(B
945
+
946
+ | Note that if the unnormalized attribute value contains a character
947
+ | reference to a white space character other than space (#x20),
948
+ | the normalized value contains the referenced character itself (#xD,
949
+ | #xA or #x9). This contrasts with the case where the unnormalized value
950
+ | contains a white space character (not a reference), which is replaced
951
+ | with a space character (#x20) in the normalized value and also contrasts
952
+ | with the case where the unnormalized value contains an entity reference
953
+ | whose replacement text contains a white space character; being recursively
954
+ | processed, the white space character is replaced with a space character
955
+ | (#x20) in the normalized value.
956
+
957
+ $B@55,2=$5$l$F$$$J$$B0@-CM$,%9%Z!<%9J8;z(B (#x20) $B0J30$N6uGrJ8;z$X$NJ8;z;2>H$r(B
958
+ $B4^$s$G$$$k>l9g!"@55,2=$5$l$?CM$K;2>HJ8;z$=$N$b$N(B (#xD, #xA, #x9) $B$,(B
959
+ $B4^$^$l$k$3$H$KCm0U$;$h!#$3$l$O!"@55,2=$5$l$F$$$J$$CMFb$K(B ($B;2>H$G$J$$(B)
960
+ $B6uGrJ8;z$,B8:_$9$k>l9g$,$"$k$H$$$&$3$H$r<($7$F$$$k!#$3$l$i$N6uGrJ8;z$O!"(B
961
+ $B@55,2=$5$l$?CMFb$G$O%9%Z!<%9J8;z(B (#x20) $B$KCV49$5$l$k!#$^$?!"(B
962
+ $B@55,2=$5$l$F$$$J$$CMFb$K!"CV49%F%-%9%H$K6uGrJ8;z$r4^$`<BBN;2>H$,B8:_$9(B
963
+ $B$k$3$H$b$"$jF@$k!#$3$N>l9g!"CV49%F%-%9%H$O:F5"E*$K=hM}$5$l$k$?$a!"(B
964
+ $B@55,2=$5$l$?CMFb$G$O6uGrJ8;z$O%9%Z!<%9J8;z$KCV49$5$l$k!#(B
965
+
966
+ | All attributes for which no declaration has been read should be treated by a
967
+ | non-validating [E95]processor as if declared CDATA.
968
+
969
+ $BBEEv@-$r8!>Z$7$J$$%W%m%;%5$O!"@k8@$,FI$_9~$^$l$F$$$J$$B0@-$OA4$F(B
970
+ CDATA $B$H$7$F@k8@$5$l$?$b$N$H$_$J$9$N$,K>$^$7$$!#(B
971
+
972
+ | Following are examples of attribute normalization. Given the following
973
+ | declarations:
974
+ |
975
+ | <!ENTITY d "&#xD;">
976
+ | <!ENTITY a "&#xA;">
977
+ | <!ENTITY da "&#xD;&#xA;">
978
+ |
979
+ | the attribute specifications in the left column below would be normalized to
980
+ | the character sequences of the middle column if the attribute a is declared
981
+ | NMTOKENS and to those of the right columns if a is declared CDATA.
982
+ |
983
+ | Attribute specification | a is NMTOKENS | a is CDATA
984
+ | -------------------------------------+---------------+-------------------
985
+ | a=" | x y z | #x20 #x20 x y z
986
+ | | |
987
+ | xyz" | |
988
+ | -------------------------------------+---------------+-------------------
989
+ | a="&d;&d;A&a;&a;B&da;" | A #x20 B | #x20 #x20 A #x20
990
+ | | | #x20 B #x20 #x20
991
+ | -------------------------------------+---------------+-------------------
992
+ | a="&#xd;&#xd;A&#xa;&#xa;B&#xd;&#xa; | #xD #xD A #xA | #xD #xD A #xA #xA
993
+ | | #xA B #xD #xA | B #xD #xD
994
+ |
995
+ | Note that the last example is invalid (but well-formed) if a is declared
996
+ | to be of type NMTOKENS.
997
+
998
+ $BB0@-CM$N@55,2=$NNc$r0J2<$K<($9!#$^$:!"<!$N$h$&$J@k8@$rM?$($k!#(B
999
+
1000
+ <!ENTITY d "&#xD;">
1001
+ <!ENTITY a "&#xA;">
1002
+ <!ENTITY da "&#xD;&#xA;">
1003
+
1004
+ $B<!$NI=$O!"1&$N9T$N$h$&$KB0@-$,M?$($i$l$?>l9g!"$=$NB0@-$,(B
1005
+ NMTOKEN $B$H$7$F@k8@$5$l$F$$$l$P??$sCf$N9T$N$h$&$JJ8;zNs$K@55,2=$5$l!"(B
1006
+ CDATA $B$H$7$F@k8@$5$l$F$$$l$P:8$N9T$N$h$&$K@55,2=$5$l$k$3$H$r<($7$F$$$k!#(B
1007
+
1008
+ Attribute specification | a is NMTOKENS | a is CDATA
1009
+ -------------------------------------+---------------+-------------------
1010
+ a=" | x y z | #x20 #x20 x y z
1011
+ | |
1012
+ xyz" | |
1013
+ -------------------------------------+---------------+-------------------
1014
+ a="&d;&d;A&a;&a;B&da;" | A #x20 B | #x20 #x20 A #x20
1015
+ | | #x20 B #x20 #x20
1016
+ -------------------------------------+---------------+-------------------
1017
+ a="&#xd;&#xd;A&#xa;&#xa;B&#xd;&#xa; | #xD #xD A #xA | #xD #xD A #xA #xA
1018
+ | #xA B #xD #xA | B #xD #xD
1019
+
1020
+ a $B$,(B NMTOKEN $B7?$H$7$F@k8@$5$l$F$$$?>l9g$O!":G8e$NNc$OBEEv$G$O$J$$(B
1021
+ ($B@07A<0$G$O$"$k(B) $B$3$H$KCm0U$;$h!#(B
1022
+
1023
+ ==> Partially Implemented in XMLScan::XMLParser.
1024
+
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+ # from the ``Namespaces in XML''
1036
+
1037
+ | Namespace constraint: Reserved Prefixes and Namespace Names
1038
+ |
1039
+ | The prefix xml is by definition bound to the namespace name
1040
+ | http://www.w3.org/XML/1998/namespace. It may, but need not, be declared,
1041
+ | and must not be bound to any other namespace name. No other prefix may be
1042
+ | bound to this namespace name.
1043
+ |
1044
+ | The prefix xmlns is used only to declare namespace bindings and is by
1045
+ | definition bound to the namespace name http://www.w3.org/2000/xmlns/.
1046
+ | It must not be declared. No other prefix may be bound to this namespace
1047
+ | name.
1048
+ |
1049
+ | All other prefixes beginning with the three-letter sequence x, m, l,
1050
+ | in any case combination, are reserved. This means that
1051
+ |
1052
+ | * users should not use them except as defined by later specifications
1053
+ | * processors must not treat them as fatal errors.
1054
+ |
1055
+ | Though legal, it is inadvisable to use prefixed names whose LocalPart
1056
+ | begins with the letters x, m, l, as these names would be reserved if used
1057
+ | without a prefix.
1058
+
1059
+ Namespace Constraint: $BM=Ls$5$l$?@\F,<-$HL>A06u4VL>(B
1060
+
1061
+ $B@\F,<-(B "xml" $B$ODj5A$K$h$jL>A06u4VL>(B "http://www.w3.org/XML/1998/namespace"
1062
+ $B$K4XO"IU$1$i$l$k!#I,MW$G$O$J$$$,$3$l$r@k8@$7$F$b$h$/!"$^$?$3$N@\F,<-$r(B
1063
+ $BB>$NL>A06u4VL>$K%P%$%s%I$7$F$O$J$i$J$$!#B>$N@\F,<-$r$3$NL>A06u4VL>$K(B
1064
+ $B4XO"IU$1$F$O$J$i$J$$!#(B
1065
+
1066
+ $B@\F,<-(B "xmlns" $B$OL>A06u4V$N4XO"IU$1$r@k8@$9$k$?$a$@$1$KMQ$$$i$l!"(B
1067
+ $BDj5A$K$h$jL>A06u4VL>(B "http://www.w3.org/2000/xmlns/" $B$K4XO"IU$1$i$l$k!#(B
1068
+ $B$3$l$r@k8@$7$F$O$J$i$J$$!#B>$N@\F,<-$r$3$NL>A06u4VL>$K4XO"IU$1$F$O(B
1069
+ $B$J$i$J$$!#(B
1070
+
1071
+ $B$3$l$i0J30$G!"BgJ8;z!&>.J8;z$NAH$_9g$o$;$rLd$o$:(B x, m, l $B$N(B3$BJ8;z$,JB$s$G(B
1072
+ $B;O$^$k@\F,<-$O!"(BXML $B5Z$S(B XML $B4XO"5,3J$G$N;HMQ$N$?$a$KM=Ls$5$l$F$$$k!#(B
1073
+ $B$3$l$O<!$N$3$H$r0UL#$9$k!#(B
1074
+ * $B8e$N5,3J$GDj5A$5$l$J$$8B$j!"%f!<%6!<$O$3$l$i$r;HMQ$9$k$Y$-$G$O$J$$!#(B
1075
+ * $B%W%m%;%5$O$3$l$i$rCWL?E*$J%(%i!<$H$7$F07$C$F$O$J$i$J$$!#(B
1076
+
1077
+ $B@\F,<-$,IU$-!"(BLocalPart $B$,(B x, m, l $B$NJ8;z$G;O$^$kL>A0$O$3$N@)Ls$r(B
1078
+ $BK~$?$7$F$O$$$k$,!"@\F,<-L5$7$GMQ$$$i$l$?>l9g$KM=Ls$5$l$?L>A0$H$J$C$F(B
1079
+ $B$7$^$&$?$a!"$=$N$h$&$JL>A0$rMQ$$$k$N$O4+$a$i$l$J$$!#(B
1080
+
1081
+ ==> Implemented in XMLScan::XMLNamespace.
1082
+
1083
+
1084
+
1085
+ | Namespace Constraint: Prefix Declared
1086
+ |
1087
+ | The namespace prefix, unless it is xml or xmlns, must have been declared
1088
+ | in a namespace declaration attribute in either the start-tag of the element
1089
+ | where the prefix is used or in an an ancestor element (i.e. an element in
1090
+ | whose content the prefixed markup occurs). [DEL:(*1):DEL]
1091
+ |
1092
+ | This constraint may lead to operational difficulties in the case where the
1093
+ | namespace declaration attribute is provided, not directly in the XML document
1094
+ | entity, but via a default attribute declared in an external entity.
1095
+ | Such declarations may not be read by software which is based on a
1096
+ | non-validating XML processor. Many XML applications, presumably including
1097
+ | namespace-sensitive ones, fail to require validating processors.
1098
+ | For correct operation with such applications, namespace declarations must
1099
+ | be provided either directly or via default attributes declared in the
1100
+ | internal subset of the DTD.
1101
+ |
1102
+ | (*1) The prefix xml is by definition bound to the namespace name
1103
+ | http://www.w3.org/XML/1998/namespace. The prefix xmlns is used
1104
+ | only for namespace bindings and is not itself bound to any
1105
+ | namespace name.
1106
+
1107
+ Namespace Constraint: $B@\F,<-$,@k8@$5$l$F$$$k$3$H(B
1108
+
1109
+ "xml" $BKt$O(B "xmlns" $B0J30$NL>A06u4V@\F,<-$O!"$=$N@\F,<-$,;HMQ$5$l$F$$$k(B
1110
+ $BMWAG$N3+;O%?%0$+$=$NAD@h$NMWAG(B ($B$9$J$o$A@\F,<-$N$D$$$?%^!<%/%"%C%W$r(B
1111
+ $BFbMF$K;}$DMWAG(B) $B$NCf$G!"L>A06u4V@k8@B0@-$K$h$C$F@k8@$5$l$F$$$J$1$l$P(B
1112
+ $B$J$i$J$$!#(B[DEL:(*1):DEL]
1113
+
1114
+ $B$3$N@)Ls$O!"L>A06u4V@k8@B0@-$,(B XML $BJ8=q<BBN$NCf$KD>@\B8:_$9$k$N$G$O$J$/!"(B
1115
+ $B30It<BBN$G@k8@$5$l$F$$$kB0@-$N%G%U%)%k%H$KB8:_$9$k>l9g!"A`:n>e$N:$Fq$r(B
1116
+ $B>7$/$@$m$&!#BEEv@-$r8!>Z$7$J$$(BXML$B%W%m%;%5$r85$K$7$?%=%U%H%&%'%"$O!"(B
1117
+ $B$=$N$h$&$J@k8@$rFI$_9~$^$J$$!#B?$/$N(B XML $B%"%W%j%1!<%7%g%s$O!"L>A06u4V$r(B
1118
+ $BG'<1$9$k$b$N$b$*$=$i$/4^$a!"BEEv@-$r8!>Z$9$k%W%m%;%5$rMW5a$9$k$3$H$K(B
1119
+ $B<:GT$9$k!#$=$N$h$&$J%"%W%j%1!<%7%g%s$G$N@5$7$$A`:n$N$?$a$K!"L>A06u4V(B
1120
+ $B@k8@$O!"J8=qCf$KD>@\8=$l$k$+!"Kt$OFbIt(BDTD$B%5%V%;%C%H$G@k8@$5$l$F$$$k(B
1121
+ $BB0@-$N%G%U%)%k%H$K8=$l$J$1$l$P$J$i$J$$!#(B
1122
+
1123
+ (*1) $B@\F,<-(B "xml" $B$ODj5A$K$h$jL>A06u4VL>(B
1124
+ "http://www.w3.org/XML/1998/namespace" $B$K4XO"IU$1$i$l$k!#(B
1125
+ $B@\F,<-(B "xmlns" $B$OL>A06u4V$N4XO"IU$1$r@k8@$9$k$?$a$@$1$KMQ$$$i$l!"(B
1126
+ $B$=$l<+?H$O$I$NL>A06u4VL>$K$b4XO"IU$1$i$l$J$$!#(B
1127
+
1128
+ ==> Partially Implemented in XMLScan::XMLNamespace.
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+ | 5.1 Namespace Scoping
1137
+ |
1138
+ | [UPD:A namespace declaration is considered to apply to the element where
1139
+ | it is specified and its attributes, and to all elements and their attributes
1140
+ | within the content of that element, unless overridden by another namespace
1141
+ | declaration with the same NSAttName part.:UPD]
1142
+
1143
+ 5.1 $BL>A06u4V$N%9%3!<%W(B
1144
+
1145
+ [UPD:$BL>A06u4V@k8@$O!"F1$8(B NSAttName $BItJ,$r;}$DB>$NL>A06u4V@k8@$K$h$C$F(B
1146
+ $B>e=q$-$5$l$J$$8B$j!"$=$l$,;XDj$5$l$?MWAG$H$=$NB0@-!"5Z$S$=$NMWAG$N(B
1147
+ $BFbMF$K$"$kA4$F$NMWAG$H$=$NB0@-$KE,MQ$5$l$k$b$N$H$9$k!#(B:UPD]
1148
+
1149
+ ==> Implemented in XMLScan::XMLNamespace.
1150
+
1151
+
1152
+ | 5.2 Namespace Defaulting
1153
+ |
1154
+ | [UPD:A default namespace declaration is considered to apply to the element
1155
+ | where it is specified, and to all elements within the content of that
1156
+ | element, unless overridden by another default namespace declaration.:UPD]
1157
+
1158
+ 5.2 $BL>A06u4V$N%G%U%)%k%H(B
1159
+
1160
+ [UPD:$B%G%U%)%k%HL>A06u4V@k8@$O!"B>$N%G%U%)%k%HL>A06u4V@k8@$K$h$C$F>e=q$-(B
1161
+ $B$5$l$J$$8B$j!"$=$l$,;XDj$5$l$?MWAG5Z$S$=$NMWAG$NFbMF$K$"$kA4$F$NMWAG$K(B
1162
+ $BE,MQ$5$l$k$b$N$H$9$k!#(B:UPD]
1163
+
1164
+ ==> Implemented in XMLScan::XMLNamespace.
1165
+
1166
+
1167
+ | 5.3 Uniqueness of Attributes
1168
+ |
1169
+ | In XML documents conforming to this specification, no tag may contain two
1170
+ | attributes which:
1171
+ |
1172
+ | 1. have identical names, or
1173
+ | 2. have qualified names with the same local part and with prefixes which
1174
+ | have been bound to namespace names that are identical.
1175
+
1176
+ 5.3 $BB0@-$N0l0U@-(B
1177
+
1178
+ $B$3$N5,3J$K=`5r$7$?(B XML $BJ8=q$G$O!"$I$N%?%0$b<!$N$h$&$JB0@-$r(B2$B$D4^$`$3$H$O(B
1179
+ $B$G$-$J$$!#(B
1180
+
1181
+ 1. $BF10l$NL>A0$r;}$D!#Kt$O(B
1182
+ 2. $BF1$8%m!<%+%k%Q!<%H$HF10l$NL>A06u4VL>$KB+G{$5$l$F$$$k@\F,<-$+$i$J$k(B
1183
+ $B=$>~L>(B (qualified name) $B$r;}$D!#(B
1184
+
1185
+ ==> Implemented in XMLScan::XMLNamespace.
1186
+
1187
+
1188
+
1189
+
1190
+ | 6. Conformance of Documents
1191
+ |
1192
+ | This specification applies to XML 1.0 documents. To conform to this
1193
+ | specification, a document must be well-formed according to the XML 1.0
1194
+ | specification.
1195
+ |
1196
+ | In XML documents which conform to this specification, element types and
1197
+ | attribute names must match the production for QName and must satisfy the
1198
+ | "Namespace Constraints". All other tokens in the document which are
1199
+ | required, for XML 1.0 well-formedness, to match the XML production for
1200
+ | Name, must match this specification's production for NCName.
1201
+ |
1202
+ | Definition: A document is namespace-well-formed if it conforms to this
1203
+ | specification.
1204
+ |
1205
+ | It follows that in a namespace-well-formed document
1206
+ | * All element types and attribute names contain either zero or one colon;
1207
+ | * No entity names, PI targets, or notation names contain any colons.
1208
+ |
1209
+ | In addition, a namespace-well-formed document may also be namespace-valid.
1210
+ |
1211
+ | Definition: A namespace-well-formed document is namespace-valid if it is
1212
+ | valid according to the XML 1.0 specification, and all tokens other than
1213
+ | element types and attribute names which are required, for XML 1.0 validity,
1214
+ | to match the XML production for Name, match this specification's production
1215
+ | for NCName.
1216
+ |
1217
+ | It follows that in a namespace-valid document
1218
+ | * No attributes with a declared type of ID, IDREF(S), ENTITY(IES) or
1219
+ | NOTATION contain any colons.
1220
+
1221
+ 6. $BJ8=q$NE,9g@-(B
1222
+
1223
+ $B$3$N5,3J$O(B XML 1.0 $BJ8=q$KBP$7$FE,MQ$5$l$k!#$3$N5,3J$rK~B-$9$k$?$a$K$O!"(B
1224
+ $BJ8=q$O(B XML 1.0 $B5,3J$N8@$&@07A<0$G$J$1$l$P$J$i$J$$!#(B
1225
+
1226
+ $B$3$N5,3J$KE,9g$9$k(B XML $BJ8=q$G$O!"MWAG7?$HB0@-L>$O@8@.5,B'(B QName $B$K(B
1227
+ $B%^%C%A$7!"$+$DL>A06u4V@)Ls(B (Namespace Constraints) $B$rK~$?$5$J$1$l$P(B
1228
+ $B$J$i$J$$!#MW5a$5$l$kJ8=qCf$NB>$N%H!<%/%s$O!"(BXML 1.0 $B$N@07A<0@)Ls$N$?$a!"(B
1229
+ XML $B$N@8@.5,B'(B Name $B$K%^%C%A$9$k$?$a$K!"$3$N5,3J$N@8@.5,B'(B NCName $B$K(B
1230
+ $B%^%C%A$7$J$1$l$P$J$i$J$$!#(B
1231
+
1232
+ $BDj5A(B: $B$"$kJ8=q$,$3$N5,3J$KE,9g$7$F$$$k$H$-!"$=$NJ8=q$rL>A06u4V@07A<0(B
1233
+ (namespace-well-formed) $B$N(BXML$BJ8=q$H8F$V!#(B
1234
+
1235
+ $BL>A06u4V@07A<0$G$"$kJ8=q$O!"<!$N>r7o$rK~$?$9!#(B
1236
+ * $BA4$F$NMWAG7?$HB0@-L>$O(B0$B8D$+(B1$B8D$N%3%m%s$r4^$`!#(B
1237
+ * $B<BBNL>!"=hM}L?Na$N%?!<%2%C%HL>!"5Z$S5-K!L>$O%3%m%s$r4^$^$J$$!#(B
1238
+
1239
+ $B$^$?!"L>A06u4V@07A<0$G$"$kJ8=q$OF1;~$KL>A06u4VBEEv(B (namespace-valid)
1240
+ $B$G$"$C$F$b$h$$!#(B
1241
+
1242
+ $BDj5A(B: $BL>A06u4V@07A<0$G$"$kJ8=q$,(B XML 1.0 $B5,3J$GBEEv$G$"$j!"$+$D(B
1243
+ $BMW5a$5$l$kMWAG7?$HB0@-L>$r=|$/A4$F$N%H!<%/%s$,!"(BXML 1.0 $B$NBEEv@-$N(B
1244
+ $B$?$a!"(BXML $B$N@8@.5,B'(B Name $B$K%^%C%A$9$k$?$a$K!"$3$N5,3J$N@8@.5,B'(B
1245
+ NCName $B$K%^%C%A$7$F$$$k$H$-!"$=$NJ8=q$rL>A06u4VBEEv$J(BXML$BJ8=q$H8F$V!#(B
1246
+
1247
+ $BL>A06u4VBEEv$JJ8=q$O!"<!$N>r7o$rK~$?$9!#(B
1248
+ * ID, IDREF, ENTITY, $B5Z$S(B NOTATION $B7?$K@k8@$5$l$?B0@-$O%3%m%s$r(B
1249
+ $B4^$^$J$$!#(B