$Id: CONFORMANCE,v 1.2 2002/12/26 19:27:02 katsu Exp $

| English:
|
| Original English statements are all quoted from XML 1.0 specification[1],
| Namespaces in XML[3], and its errata[4]. Japanese statements are almost
| quoted from the Japanese translation of XML 1.0 specification[2] and
| modified by me to adapt to the second edition. New constraints added from
| the second edition and constraints about XML namespaces are translated
| into Japanese by me.
|
| Each line which begins with `==>' at the end of each constraint is
| displayed whether xmlscan implements that constraint or not.
|
| You can suppress Japanese sentences in this way:
|
|   ruby -ne 'print unless ~/\e/' CONFORMANCE


Japanese / $BF|K\8l(B:

$B1Q8l$N86J8$O(B XML 1.0 specification[1], Namespaces in XML[3], $B5Z$S$=$l$N(B
eratta[4]$B$+$i0zMQ$7$?!#F|K\8lLu$OBgItJ,$r(B XML 1.0 $B$NF|K\8lLu(B[2]$B$+$i0zMQ$7!"(B
$BBh(B2$BHG$X$NBP1~Ey$N$?$a<c43<j$r2C$($?!#(BXML 1.0 $BBh(B2$BHG$+$i?7$?$K2C$o$C$?@)Ls!"(B
$B5Z$SL>A06u4V$K4X$9$k@)Ls$NF|K\8lLu$O@[Lu$G$"$k!#(B

$B3F@)Ls$NKvHx$K$"$k(B `==>' $B$G;O$^$k9T$O!"8=:_$N(B xmlscan $B$K$*$1$kEv3:@)Ls$N(B
$B<BAu>u67$r<($9!#(B

$B<!$N$h$&$K$9$l$P1Q8l$NJ8$r1#$9$3$H$,$G$-$k!#(B

  ruby -ne 'print unless ~/^\|/' CONFORMANCE



[1] Tim Bray, Jean Paoli, C.M. Sperberg-McQueen, and Eve Maler.
    Extensible Markup Language (XML) 1.0 (Second Edition) Review Version.
    World Wide Web Consortium, 2000.
    (URL: http://www.w3.org/TR/2000/REC-xml-20001006-review.html)

[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
    (URL: http://www.fxis.co.jp/DMS/sgml/xml/wrapper-xml-19980210.html)

[3] Tim Bray, Dave Hollander, Andrew Layman. Namespaces in XML.
    World Wide Web Consortium, 1999.
    (URL: http://www.w3.org/TR/1999/REC-xml-names-19990114/)

[4] Namespaces in XML Errata, 29 April 2002. World Wide Web Consortium.
    (URL: http://www.w3.org/XML/xml-names-19990114-errata)







| 2.1 Well-Formed XML Documents
|
| [Definition: A textual object is a well-formed XML document if:]
|
|  1. Taken as a whole, it matches the production labeled document.
|  2. It meets all the well-formedness constraints given in this specification.
|  3. Each of the parsed entities which is referenced directly or indirectly
|     within the document is well-formed.

2.1 $B@07A<0$N(BXML$BJ8=q(B

[Definition: $B$"$k%F%-%9%H%*%V%8%'%/%H$,!"<!$N>r7o$rK~$?$9$H$-!"(B
$B$=$N%F%-%9%H%*%V%8%'%/%H$r@07A<0$N(BXML$BJ8=q$H8F$V!#(B]

 a) $BA4BN$H$7$F!"(Bdocument$B$H$$$&%i%Y%k$r$b$D@8@.5,B'$K%^%C%A$9$k!#(B
 b) $B$3$NI8=`>pJs(B(TR)$B$GDj5A$9$k$9$Y$F$N@07A<0@)Ls$K=>$&!#(B
 c) $BJ8=qFb$GD>@\E*$^$?$O4V@\E*$K;2>H$5$l$k$=$l$>$l$N2r@OBP>]<BBN$,@07A<0$H(B
    $B$J$k!#(B




| [Definition: Validating processors must[INS:[E21], at user option,:INS]
| report violations of the constraints expressed by the declarations in the
| DTD, and failures to fulfill the validity constraints given in this
| specification.] To accomplish this, validating XML processors must read and
| process the entire DTD and all external parsed entities referenced in the
| document.
|
| Non-validating processors are required to check only the document entity,
| including the entire internal DTD subset, for well-formedness. [Definition:
| While they are not required to check the document for validity, they are
| required to process all the declarations they read in the internal DTD subset
| and in any parameter entity that they read, up to the first reference to a
| parameter entity that they do not read; that is to say, they must use the
| information in those declarations to normalize attribute values, include the
| replacement text of internal entities, and supply default attribute values.]
| [INS:[E33]Except when standalone="yes",:INS] they must not process entity
| declarations or attribute-list declarations encountered after a reference
| to a parameter entity that is not read, since the entity may have contained
| overriding declarations.

[Definition: $BBEEv@-$r8!>Z$9$k%W%m%;%5$O!"(B[INS:$B%f!<%6$N%*%W%7%g%s;XDj$K(B
$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
(TR)$B$,5,Dj$9$kBEEv@-@)Ls$X$N0cH?$H$r!"$9$Y$FJs9p$7$J$1$l$P$J$i$J$$!#(B]
$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
$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

$BBEEv@-$r8!>Z$7$J$$%W%m%;%5$O!"@07A<0$G$"$k$3$H$r3NG'$9$k$?$a$K!"(B
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
[Definition: $BJ8=q$NBEEv@-$r3NG'$9$kI,MW$O$J$$$,!"FI$_9~$s$G$$$J$$(B
$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
$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
$B$9$J$o$A!"B0@-CM$r@55,2=$7!"FbIt<BBN$NCV49%F%-%9%H$r<h9~$_!"(B
$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
$B$J$i$J$$!#(B]
[INS:standalone="yes" $B$G$"$k>l9g$r=|$-!"(B:INS]$B<BBN$N@k8@$O>e=q$-$5$l$k(B
$B2DG=@-$,$"$k$N$G!"BEEv@-$r8!>Z$7$J$$%W%m%;%5$O!"FI$_9~$s$G$$$J$$(B
$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
$B$J$i$J$$!#(B






| [INS:Parameter entity references are recognized anywhere in the DTD
| (internal and external subsets and external parameter entities), except
| in literals, processing instructions, comments, and the contents of
| ignored conditional sections (see 3.4 Conditional Sections). They are also
| recognized in entity value literals. The use of parameter entities in the
| internal subset is restricted as described below.:INS]

[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
$B>r7oIU$-%;%/%7%g%s(B ($B!V(B3.4 $B>r7oIU$-%;%/%7%g%s!W;2>H(B) $B$r=|$-!"(BDTD
($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
$B$^$?!"%j%F%i%k<BBNCM$NCf$G$bG'<1$5$l$k!#FbIt%5%V%;%C%HFb$G$N(B
$B%Q%i%a%?<BBN$N;H$$J}$O8e=R$9$k$h$&$K@)8B$5$l$k!#(B:INS]




== $B%Q%i%a%?<BBN$K4X$9$k%a%b(B

SGML $B$G$O(B:

$B%Q%i%a%?<BBN;2>H3+;O6h@Z$j;R(B % $B$O(B
  * DSM $B!D(B $B@k8@ItJ,=89gKt$O$=$NCf$N%^!<%/6h4V@k8@$N%^!<%/@k8@$NCf(B
  * GRP $B!D(B $B72$NCf(B
  * MD  $B!D(B $B%^!<%/@k8@$NCf(B
  * LIT $B!D(B $BI=5-$NCf(B
$B$GG'CN$9$k!#(B

$B0z?t<BBN;2>H$O!"(B
  * $B0z?tJ,N%;R(Bps
  * $B0z?tI=5-(B
  * $B72(B
  * $B@k8@J,N%;R(Bds
$B$NJ8L.$K8=$l$k!#(B

XML $B$NMQ8l$KK]Lu$9$k$H(B:

$B%Q%i%a%?<BBN;2>H3+;O6h@Z$j;R(B % $B$O(B
  * DSM $B!D(B DTD$B%5%V%;%C%HKt$O$=$NCf$N>r7oIU$-%;%/%7%g%s$N%-!<%o!<%I(B
  * GRP $B!D(B $BFbMF%b%G%k$NCf(B
  * MD  $B!D(B $B%^!<%/IU$1@k8@$NCf(B
  * LIT $B!D(B $B%j%F%i%k$NCf(B
$B$GG'CN$7!"(B
  * ($B>r7oIU$-%;%/%7%g%s$b4^$_(B)$B%^!<%/IU$1@k8@Fb$N0z?t$N4V(B
  * $B%j%F%i%k<BBNCM(B
  * $BFbMF%b%G%k(B
  * $B%^!<%/IU$1@k8@$N4V(B
$B$NJ8L.$K8=$l$k!#(B

$B!D$H$$$&$3$H$+$J!)(B






| Well-formedness constraint: PEs in Internal Subset
|
| In the internal DTD subset, parameter-entity references can occur only where
| markup declarations can occur, not within markup declarations. (This does not
| apply to references that occur in external parameter entities or to the
| external subset.)

Well-formedness constraint: $BFbIt%5%V%;%C%HFb$N%Q%i%a%?<BBN(B

DTD$B$NFbIt%5%V%;%C%H$G$O!"%Q%i%a%?<BBN;2>H$O!"%^!<%/IU$1@k8@$,=P8=2DG=$J(B
$B>l=j$@$1$K=P8=$G$-$k!#%^!<%/IU$1@k8@$N0lIt$H$7$F$O=P8=$G$-$J$$!#$3$N@)Ls$O(B
$B30It%Q%i%a%?<BBNKt$O30It%5%V%;%C%H$G$N;2>H$K$OE,MQ$7$J$$!#(B

 ==> Not Implemented.




| [INS:
| Well-formedness constraint: [E109]External Subset
|
| The external subset, if any, must match the production for extSubset.
| :INS]

[INS:
Well-formedness constraint: $B30It%5%V%;%C%H(B

$B30It%5%V%;%C%H$O!"(BextSubset $B$K%^%C%A$7$J$1$l$P$J$i$J$$!#(B
:INS]

 ==> Not Implemented.




| [INS:
| Well-formedness constraint: [E109]PE Between Declarations
|
| The replacement text of a parameter entity reference in a DeclSep
| must match the production extSubsetDecl.
| :INS]

[INS:
Well-formedness constraint: $B@k8@4V$N%Q%i%a%?<BBN(B

DeclSep $BCf$N%Q%i%a%?<BBN;2>H$NCV49%F%-%9%H$O(B extSubsetDecl $B$K(B
$B%^%C%A$7$J$1$l$P$J$i$J$$!#(B
:INS]

 ==> Not Implemented.




| Well-formedness constraint: Element Type Match
|
| The Name in an element's end-tag must match the element type in the
| start-tag.

Well-formedness constraint: $BMWAG7?$N%^%C%A(B

$BMWAG$N=*N;%?%0$NL>A0$O!"$=$NMWAG$N3+;O%?%0$K$*$1$kMWAG7?(B ($B$NL>A0(B) $B$H(B
$B%^%C%A$7$J$1$l$P$J$i$J$$!#(B

 ==> Implemented in XMLScan::XMLParser.




| Well-formedness constraint: Unique Att Spec
|
| No attribute name may appear more than once in the same start-tag or
| empty-element tag.

Well-formedness constraint: $BB0@-;XDj$N0l0U@-(B

$B3+;O%?%0Kt$O6uMWAG%?%0$G$O!"F10l$NB0@-L>$,Fs2s0J>e=P8=$7$F$O$J$i$J$$!#(B

 ==> Implemented in XMLScan::XMLParser.




| Well-formedness constraint: No External Entity References
|
| Attribute values cannot contain direct or indirect entity references to
| external entities.

Well-formedness constraint: $B30It<BBN$X$N;2>H$,$J$$$3$H(B

$BB0@-CM$K$O!"30It<BBN$X$ND>@\E*Kt$O4V@\E*$J;2>H$r4^$`$3$H$O$G$-$J$$!#(B

 ==> Not Implemented.




| Well-formedness constraint: No < in Attribute Values
|
| The replacement text of any entity referred to directly or indirectly in an
| attribute value [DEL:(*1):DEL] must not contain a <.
|
| (*1) (other than "&lt;")

Well-formedness constraint: $BB0@-CM$K(B < $B$r4^$^$J$$$3$H(B

$BB0@-CMFb$GD>@\E*Kt$O4V@\E*$K;2>H$9$k<BBN(B [DEL:(*1):DEL] $B$NCV49%F%-%9%H(B
$B$K$O!"(B< $B$r4^$s$G$O$J$i$J$$!#(B

(*1) ("&lt;"$B$r=|$/!#(B)

 ==> Partially Implemented in XMLScan::XMLScanner.




| Well-formedness constraint: Legal Character
|
| Characters referred to using character references must match the production
| for Char.

Well-formedness constraint: $B;HMQ$G$-$kJ8;z(B

$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

 ==> Not Implemented.




| Well-formedness constraint: Entity Declared
|
| In a document without any DTD, a document with only an internal DTD subset
| which contains no parameter entity references, or a document with
| "standalone='yes'", [UPD:[E34]for an entity reference that does not occur
| within the external subset or a parameter entity, the Name given in the
| entity reference must match that in an entity declaration that does not occur
| within the external subset or a parameter entity:UPD], except that
| well-formed documents need not declare any of the following entities: amp,
| lt, gt, apos, quot. [DEL:(*1):DEL] The declaration of a general entity
| must precede any reference to it which appears in a default value in
| an attribute-list declaration.
|
| Note that if entities are declared in the external subset or in external
| parameter entities, a non-validating processor is not obligated to read and
| process their declarations; for such documents, the rule that an entity
| must be declared is a well-formedness constraint only if standalone='yes'.
|
| (*1) [E29]The declaration of a parameter entity must precede
|      any reference to it. Similarly,

Well-formedness constraint: $B<BBN$,@k8@$5$l$F$$$k$3$H(B

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
$BKt$O(B "standalone='yes'" $B$r$b$DJ8=q$K$*$$$F!"(B[UPD:$B30It%5%V%;%C%HKt$O(B
$B%Q%i%a%?<BBNFb$K8=$l$J$$<BBN;2>H$GMQ$$$k(B Name $B$O!"30It%5%V%;%C%HKt$O(B
$B%Q%i%a%?<BBNFb$K8=$l$J$$<BBN@k8@$H%^%C%A$7$J$1$l$P$J$i$J$$!#(B:UPD]
$B$?$@$7!"@07A<0$NJ8=q$O!"<BBN(B amp, lt, gt, apos, quot $B$r@k8@$9$kI,MW$O$J$$!#(B
[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
$B@h$K!"@k8@$,8=$l$J$1$l$P$J$i$J$$!#(B

$B30It%5%V%;%C%HKt$O30It%Q%i%a%?<BBN$G<BBN$r@k8@$9$k$H$-!"BEEv@-$r8!>Z$7$J$$(B
$B%W%m%;%5$,!"@k8@$rFI$_!"=hM}$9$k$3$H$r5AL3$E$1$J$$$3$H$KCm0U!#(B
$B$=$l$i$NJ8=q$G$O!"<BBN$O@k8@$5$l$J$1$l$P$J$i$J$$$H$$$&5,B'$O!"(B
standalone='yes' $B$N>l9g$N$_!"@07A<0@)Ls$H$J$k!#(B

(*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

 ==> Not Implemented.




| Well-formedness constraint: Parsed Entity
|
| An entity reference must not contain the name of an unparsed entity. Unparsed
| entities may be referred to only in attribute values declared to be of type
| ENTITY or ENTITIES.

Well-formedness constraint: $B2r@OBP>]<BBN(B

$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
ENTITY $B7?Kt$O(B ENTITIES $B7?$H$7$F@k8@$7$?B0@-CM$H$7$F$@$1;2>H$G$-$k!#(B

 ==> Not Implemented.




| Well-formedness constraint: No Recursion
|
| A parsed entity must not contain a recursive reference to itself, either
| directly or indirectly.

Well-formedness constraint: $B:F5"$J$7(B

$B2r@OBP>]<BBN$O!"$=$l<+BN$X$N;2>H$r!"D>@\$K$b4V@\$K$b4^$s$G$O$J$i$J$$!#(B

 ==> Not Implemented.




| Well-formedness constraint: In DTD
|
| Parameter-entity references may only appear in the DTD.

Well-formedness constraint: DTD $B$NCf(B

$B%Q%i%a%?<BBN;2>H$O!"(BDTD $BFb$K$@$1!"=P8=$7$F$h$$!#(B

 ==> Not Implemented.









| Validity constraint: Root Element Type
|
| The Name in the document type declaration must match the element type
| of the root element.

Validity constraint: $B%k!<%HMWAG7?(B

$BJ8=q7?@k8@$K$*$1$k(BName$B$O!"%k!<%HMWAG$N7?$H%^%C%A$7$J$1$l$P$J$i$J$$!#(B

 ==> Not Implemented.




| Validity constraint: Proper Declaration/PE Nesting
|
| Parameter-entity replacement text must be properly nested with markup
| declarations. That is to say, if either the first character or the last
| character of a markup declaration (markupdecl above) is contained in the
| replacement text for a parameter-entity reference, both must be contained in
| the same replacement text.

Validity constraint: $B@k8@5Z$S%Q%i%a%?<BBN$,87L)$KF~$l;R$r$J$9$3$H(B

$B%Q%i%a%?<BBN$NCV49%F%-%9%H$O!"%^!<%/IU$1@k8@Fb$K$*$$$F!"87L)$K(B
$BF~$l;R$K$J$C$F$$$J$1$l$P$J$i$J$$!#$D$^$j!"%^!<%/IU$1@k8@(B(markupdecl)$B$N(B
$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
$BN>J}$H$bF1$8CV49%F%-%9%H$K4^$^$l$J$1$l$P$J$i$J$$!#(B

 ==> Not Implemented.




| Validity constraint: Standalone Document Declaration
|
| The standalone document declaration must have the value "no" if any external
| markup declarations contain declarations of:
|
|  a) attributes with default values, if elements to which these attributes
|     apply appear in the document wi	thout specifications of values for these
|     attributes, or
|
|  b) entities (other than amp, lt, gt, apos, quot), if references to those
|     entities appear in the document, or
|
|  c) attributes with values subject to normalization, where the attribute
|     appears in the document with a value which will change as a result of
|     normalization, or
|
|  d) element types with element content, if white space occurs directly within
|     any instance of those types.

Validity constraint: $B%9%?%s%I%"%m%sJ8=q@k8@(B

$B%9%?%s%I%"%m%sJ8=q@k8@$O!"2?$i$+$N30It%^!<%/IU$1@k8@$,<!$N$$$:$l$+$r(B
$B@k8@$7$F$$$k$H$-$O!"CM(B "no" $B$r<h$i$J$1$l$P$J$i$J$$!#(B

  a) $B%G%U%)%k%HCMIU$-$NB0@-$G$"$C$F!"$3$NB0@-$,E,MQ$5$l$kMWAG$,(B
     $BB0@-CM$r;XDj$;$:$KJ8=qFb$K8=$l$k$b$N!#(B
  b) amp, lt, gt, apos, quot$B0J30$N<BBN$G$"$C$F!"$=$N<BBN$KBP$9$k(B
     $B;2>H$,J8=qFb$K=P8=$9$k$b$N!#(B
  c) $BCM$,@55,2=$NBP>]$H$J$kB0@-$G$"$C$F!"@55,2=$N7k2L$H$7$FJQ2=$9$kCM$,(B
     $BJ8=qFb$GB0@-$K;XDj$5$l$F$$$k$b$N!#(B
  d) $BMWAGFbMF$r$b$DMWAG7?$G$"$C$F!"6uGr$,$=$NMWAG7?$N$$$:$l$+$N(B
     $B%$%s%9%?%s%9Fb$KD>@\8=$l$k$b$N!#(B

 ==> Not Implemented.




| Validity constraint: Element Valid
|
| An element is valid if there is a declaration matching elementdecl where the
| Name matches the element type, and one of the following holds:
|
|  1. The declaration matches EMPTY and the element has no content.
|
|  2. The declaration matches children and the sequence of child elements
|     belongs to the language generated by the regular expression in the
|     content model, with optional white space (characters matching the
|     nonterminal S) between [UPD:[E59]the start-tag and the first child
|     element, between child elements, or between the last child element
|     and the end-tag. Note that a CDATA section containing only white space
|     does not match the nonterminal S, and hence cannot appear in these
|     positions.:UPD]
|
|  3. The declaration matches Mixed and the content consists of character
|     data and child elements whose types match names in the content model.
|
|  4. The declaration matches ANY, and the types of any child elements have
|     been declared.

Validity constraint: $BMWAG$NBEEv@-(B

$BMWAG$,BEEv$H$O!$$=$NMWAG7?(B ($B$NL>A0(B) $B$H%^%C%A$9$k(BName$B$r$b$D@k8@(B
(elementdecl$B$K%^%C%A$9$k$b$N(B) $B$,B8:_$7!"$5$i$K<!$N$$$:$l$+$N>r7o$rK~$?$9(B
$B>l9g$H$9$k!#(B

  1. $B@k8@$,(BEMPTY$B$K%^%C%A$7!"MWAG$,FbMF$r$b$?$J$$!#(B
  2. $B@k8@$,(Bchildren$B$K%^%C%A$7!"MWAG$N;RMWAG$NJB$S$,FbMF%b%G%kCf$N@55,I=8=$K(B
     $B$h$C$F@8@.$5$l$k8@8l$KB0$9$k!#(B[UPD:$B3+;O%?%0$H:G=i$N;RMWAG$N4V!"(B
     $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
     $B%^%C%A$9$kJ8;z$NJB$S(B) $B$,$"$C$F$b$h$$!#(B[UPD:$B6uGr$N$_$r4^$`(B CDATA
     $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
     $B$G$-$J$$$3$H$KCm0U!#(B:UPD]
  3. $B@k8@$,(BMixed$B$K%^%C%A$7!"MWAG$NFbMF$,J8;z%G!<%?5Z$S;RMWAG$+$i$J$k!#(B
     $B;RMWAG$NMWAG7?$O!"MWAG$NFbMF%b%G%k$K=P8=$9$kL>A0$K%^%C%A$9$k!#(B
  4. $B@k8@$,(BANY$B$K%^%C%A$7!"$I$N;RMWAG$NMWAG7?$b@k8@$5$l$F$$$k!#(B

 ==> Not Implemented.




| Validity constraint: Attribute Value Type
|
| The attribute must have been declared; the value must be of the type declared
| for it. (For attribute types, see 3.3 Attribute-List Declarations.)

Validity constraint: $BB0@-CM$N7?(B

$BB0@-$O@k8@$5$l$F$$$J$1$l$P$J$i$J$$!#B0@-CM$N7?$O!$$=$NB0@-$KBP$7$F(B
$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
$B;2>H(B)$B!#(B

 ==> Not Implemented.



| Validity constraint: Unique Element Type Declaration
|
| No element type may be declared more than once.

Validity constraint: $BMWAG7?@k8@$N0l0U@-(B

$B0l$D$NMWAG7?$rFs2s0J>e@k8@$G$-$J$$!#(B

 ==> Not Implemented.




| Validity constraint: Proper Group/PE Nesting
|
| Parameter-entity replacement text must be properly nested with [UPD:[E11]
| parenthesized:UPD] groups. That is to say, if either of the opening or
| closing parentheses in a choice, seq, or Mixed construct is contained in the
| replacement text for a parameter entity, both must be contained in the same
| replacement text.
|
| [UPD:[E19]For interoperability, if a parameter-entity reference appears in a
| choice, seq, or Mixed construct, its replacement text should contain at
| least one non-blank character, and neither the first nor last non-blank
| character of the replacement text should be a connector (| or ,).:UPD]

Validity constraint: $B%0%k!<%W5Z$S%Q%i%a%?<BBN$,87L)$JF~$l;R$r$J$7$F$$$k$3$H(B

$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
$B87L)$JF~$l;R$r9=@.$7$J$1$l$P$J$i$J$$!#$D$^$j!"A*Br!"NsKt$O:.:_ItIJ$K(B
$B3+$-$+$C$3Kt$OJD$8$+$C$3$N$$$:$l$+0lJ}$,%Q%i%a%?<BBN$NCV49%F%-%9%H$K(B
$B4^$l$l$P!"B>J}$bF1$8CV49%F%-%9%H$K4^$^$l$J$1$l$P$J$i$J$$!#(B

[UPD:$BAj8_1?MQ@-$N$?$a$K$O!"%Q%i%a%?<BBN;2>H$,A*Br!"NsKt$O:.:_FbMF$K(B
$B4^$^$l$l$P!"$=$NCV49%F%-%9%H$O>/$J$/$H$b(B1$B$D$NHs6uGrJ8;z$r4^$`$3$H$,(B
$BK>$^$7$/!"CV49%F%-%9%H$N@hF,5Z$SKvHx$N6uGr$G$J$$J8;z$O!"%3%M%/%?(B
(| $BKt$O(B ,) $B$G$J$$J}$,$h$$!#(B:UPD]

 ==> Not Implemented.




| Validity constraint: No Duplicate Types
|
| The same name must not appear more than once in a single mixed-content
| declaration.

Validity constraint: $BMWAG7?$N=EJ#$N6X;_(B

$B0l$D$N:.9gFbMF@k8@Fb$K!"F1$8L>A0$,J#?t2s=P8=$7$F$O$J$i$J$$!#(B

 ==> Not Implemented.




| Validity constraint: ID
|
| Values of type ID must match the Name production. A name must not appear more
| than once in an XML document as a value of this type; i.e., ID values must
| uniquely identify the elements which bear them.

Validity constraint: ID

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
$B0l$D$NL>A0$,!"$3$N7?$NCM$H$7$FJ#?t2s8=$l$F$O$J$i$J$$!#$D$^$j!"(BID$B$NCM$O(B
$BMWAG$r0l0U$KFCDj$7$J$1$l$P$J$i$J$$!#(B

 ==> Not Implemented.




| Validity constraint: One ID per Element Type
|
| No element type may have more than one ID attribute specified.

Validity constraint: 1$BMWAG$4$H$K0l$D$N(BID

$BMWAG7?$OJ#?t$N(BID$BB0@-$r$b$C$F$O$J$i$J$$!#(B

 ==> Not Implemented.




| Validity constraint: ID Attribute Default
|
| An ID attribute must have a declared default of #IMPLIED or #REQUIRED.

Validity constraint: ID$BB0@-$N%G%U%)%k%H(B

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

 ==> Not Implemented.




| Validity constraint: IDREF
|
| Values of type IDREF must match the Name production, and values of
| type IDREFS must match Names; each Name must match the value of an ID
| attribute on some element in the XML document; i.e. IDREF values must
| match the value of some ID attribute.

Validity constraint: IDREF

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
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
ID$BB0@-$NCM$H%^%C%A$7$J$1$l$P$J$i$J$$!#$D$^$j!"(BIDREF$B$NCM$O(B
$B$"$k(BID$BB0@-$NCM$H%^%C%A$7$J$1$l$P$J$i$J$$!#(B

 ==> Not Implemented.




| Validity constraint: Entity Name
|
| Values of type ENTITY must match the Name production, values of type
| ENTITIES must match Names; each Name must match the name of an unparsed
| entity declared in the DTD.

Validity constraint: $B<BBNL>(B

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
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
$B%^%C%A$7$J$1$l$P$J$i$J$$!#(B

 ==> Not Implemented.




| Validity constraint: Name Token
|
| Values of type NMTOKEN must match the Nmtoken production; values of type
| NMTOKENS must match Nmtokens.

Validity constraint: $BL>A0%H!<%/%s(B

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
Nmtokens$B$K%^%C%A$7$J$1$l$P$J$i$J$$!#(B

 ==> Not Implemented.




| Validity constraint: Notation Attributes
|
| Values of this type must match one of the notation names included in the
| declaration; all notation names in the declaration must be declared.

Validity constraint: $B5-K!B0@-(B

$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
$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

 ==> Not Implemented.




| [INS:
| Validity constraint: [E7]One Notation Per Element Type
|
| No element type may have more than one NOTATION attribute specified.
| :INS]

[INS:
Validity constraint: 1$BMWAG7?$4$H$K(B1$B$D$N5-K!(B

$BMWAG7?$OJ#?t$N(B NOTATION $BB0@-$r$b$C$F$O$J$i$J$$!#(B
:INS]

 ==> Not Implemented.




| [INS:
| Validity constraint: [E68]No Notation on Empty Element
|
| For compatibility, an attribute of type NOTATION must not be declared on an
| element declared EMPTY.
| :INS]

[INS:
Validity constraint: $B6uMWAGCf$K5-K!$r4^$^$J$$$3$H(B

$B8_49@-$N$?$a$K!"6uMWAG$H$7$F@k8@$5$l$?MWAG$KBP$7$F!"(BNOTATION $B7?$N(B
$BB0@-CM$r@k8@$9$k$3$H$O$G$-$J$$!#(B
:INS]

 ==> Not Implemented.




| Validity constraint: Enumeration
|
| Values of this type must match one of the Nmtoken tokens in the declaration.
|
| For interoperability, the same Nmtoken should not occur more than once in the
| enumerated attribute types of a single element type.

Validity constraint: $BNs5s(B

$B$3$N7?$NCM$O!"@k8@$K4^$^$l$k4v$D$+$N(BNmtoken$B%H!<%/%s$N0l$D$H%^%C%A(B
$B$7$J$1$l$P$J$i$J$$!#(B
$BAj8_1?MQ@-$N$?$a$K$O!"F1$8(BNmtoken$B$O!"0l$D$NMWAG7?$N$$$/$D$+$NNs5s7?$N(B
$BB0@-$H$7$F!"J#?t2s8=$l$J$$J}$,$h$$!#(B

 ==> Not Implemented.




| Validity constraint: Required Attribute
|
| If the default declaration is the keyword #REQUIRED, then the attribute
| must be specified for all elements of the type in the attribute-list
| declaration.

Validity constraint: $BI,?\B0@-(B

$B%G%U%)%k%H$N@k8@$,(B#REQUIRED$B%-!<%o!<%I$N>l9g!"B0@-%j%9%H@k8@$G;2>H$7$?(B
$BMWAG7?$N$9$Y$F$NMWAG$G!"$=$NB0@-$r;XDj$7$J$1$l$P$J$i$J$$!#(B

 ==> Not Implemented.




| Validity constraint: Attribute Default Legal
|
| The declared default value must meet the lexical constraints of the
| declared attribute type.

Validity constraint: $BB0@-%G%U%)%k%H$N@5$7$5(B

$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

 ==> Not Implemented.




| Validity constraint: Fixed Attribute Default
|
| If an attribute has a default value declared with the #FIXED keyword,
| instances of that attribute must match the default value.

Validity constraint: $B8GDj$NB0@-%G%U%)%k%H(B

$BB0@-$,(B#FIXED$B%-!<%o!<%I$G@k8@$5$l$?%G%U%)%k%HCM$r;}$D>l9g!"$=$NB0@-$N(B
$B%$%s%9%?%s%9$O%G%U%)%k%HCM$K%^%C%A$7$J$1$l$P$J$i$J$$!#(B

 ==> Not Implemented.




| [INS:
| Validity constraint: [E90]Proper Conditional Section/PE Nesting
|
| If any of the "<![", "[", or "]]>" of a conditional section is contained
| in the replacement text for a parameter-entity reference, all of them
| must be contained in the same replacement text.
|
| Like the internal and external DTD subsets, a conditional section may
| contain one or more complete declarations, comments, processing
| instructions, or nested conditional sections, intermingled with white space.
| :INS]

[INS:
Validity constraint: $B>r7o%;%/%7%g%s5Z$S%Q%i%a%?<BBN$,87L)$JF~$l;R$r(B
                     $B$J$7$F$$$k$3$H(B

$B%Q%i%a%?<BBN;2>H$NCV49%F%-%9%H$K>r7o%;%/%7%g%s$N(B "<![", "[", "]]>" $B$N$&$A$N(B
$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
$B$J$i$J$$!#(B

$BFbIt5Z$S30It(B DTD $B%5%V%;%C%H$N$h$&$K!">r7o%;%/%7%g%s$O40A4$J@k8@!"(B
$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
1$B$D0J>e4^$s$G$b$h$$!#(B
:INS]

 ==> Not Implemented.




| Validity constraint: Entity Declared
|
| In a document with an external subset or external parameter entities with
| "standalone='no'", the Name given in the entity reference must match that
| in an entity declaration. For interoperability, valid documents should
| declare the entities amp, lt, gt, apos, quot, in the form specified in 4.6
| Predefined Entities. The declaration of a parameter entity must precede
| any reference to it. Similarly, the declaration of a general entity must
| precede any [UPD:[E92]attribute-list declaration containing a default value
| with a direct or indirect reference to that general entity.:UPD]

Validity constraint: $B<BBN$,@k8@$5$l$F$$$k$3$H(B

$B30It%5%V%;%C%HKt$O30It%Q%i%a%?<BBN$r$b$C$F$$$F!"(B"standalone='no'"$B$r(B
$B$b$DJ8=q$K$*$$$F!"<BBN;2>H$GMQ$$$k(B Name $B$O!"$"$k<BBN@k8@$K4^$^$l$kL>A0$H(B
$B%^%C%A$7$J$1$l$P$J$i$J$$!#Aj8_1?MQ@-$N$?$a$K$O!"BEEv$JJ8=q$O(B
"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
$B@k8@$9$k$3$H$,K>$^$7$$!#%Q%i%a%?<BBN$N>l9g$O!"@k8@$O!";2>H$K(B
$B@h9T$7$J$1$l$P$J$i$J$$!#F1MM$K!"0lHL<BBN$N>l9g$O!"(B
[UPD:$B$=$N0lHL<BBN$X$N;2>H$rD>@\E*Kt$O4V@\E*$K4^$s$G$$$k%G%U%)%k%HCM$r4^$`(B
$BB0@-%j%9%H@k8@(B:UPD]$B$h$j$b@h$K!"@k8@$,8=$l$J$1$l$P$J$i$J$$!#(B

 ==> Not Implemented.




| Validity constraint: Notation Declared
|
| The Name must match the declared name of a notation.

Validity constraint: $B5-K!$,@k8@$5$l$F$$$k$3$H(B
Name $B$O!"@k8@$7$?5-K!$NL>A0$H%^%C%A$7$J$1$l$P$J$i$J$$!#(B

 ==> Not Implemented.




| [INS:
| Validity constraint: [E22]Unique Notation Name
|
| Only one notation declaration can declare a given Name.
| :INS]

[INS:
Validity constraint: $B5-K!$NL>A0$N0l0U@-(B

$BJ#?t$N5-K!@k8@$GF1$8L>A0$r@k8@$G$-$J$$!#(B
:INS]

 ==> Not Implemented.









# from the second edition;

| 3.3.3 [E70]Attribute-Value Normalization
|
| Before the value of an attribute is passed to the application or checked for
| validity, the XML processor must normalize the attribute value by applying
| the algorithm below, or by using some other method such that the value
| passed to the application is the same as that produced by the algorithm.
|
|  1. All line breaks must have been normalized on input to #xA as described in
|     2.11 End-of-Line Handling, so the rest of this algorithm operates on text
|     normalized in this way.
|
|  2. Begin with a normalized value consisting of the empty string.
|
|  3. For each character, entity reference, or character reference in the
|     unnormalized attribute value, beginning with the first and continuing to
|     the last, do the following:
|
|      a) For a character reference, append the referenced character to the
|         normalized value.
|      b) For an entity reference, recursively apply step 3 of this algorithm
|         to the replacement text of the entity.
|      c) For a white space character (#x20, #xD, #xA, #x9), append a space
|         character (#x20) to the normalized value.
|      d) For another character, append the character to the normalized value.

3.3.3 $BB0@-CM$N@55,2=(B

$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
$B0J2<$N%"%k%4%j%:%`$rE,MQ$7$FB0@-CM$r@55,2=$7$J$1$l$P$J$i$J$$!#Kt$O!"(B
$B0J2<$N%"%k%4%j%:%`$,@8@.$9$kCM$HF1$8CM$r%"%W%j%1!<%7%g%s$KEO$9B>$NJ}K!$r(B
$BMQ$$$F@55,2=$7$F$b$h$$!#(B

 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
    #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
    $B$G$O!"$3$N$h$&$K$7$F@55,2=$5$l$?%F%-%9%H$r=hM}$NBP>]$H$9$k!#(B

 2. $B6uJ8;zNs$+$i$J$k@55,2=$5$l$?CM$+$i;O$a$k!#(B

 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
    $B@hF,$+$iKvHx$^$G0J2<$NA`:n$rB3$1$k!#(B

     a) $BJ8;z;2>H$K$D$$$F$O!";2>HJ8;z$r@55,2=$5$l$?CM$KDI2C$9$k!#(B
     b) $B<BBN;2>H$K$D$$$F$O!"$=$NCV49%F%-%9%H$KBP$7$F$3$N%"%k%4%j%:%`$N(B
        $B%9%F%C%W(B 3 $B$r:F5"E*$KE,MQ$9$k!#(B
     c) $B6uGrJ8;z(B (#x20, #xD, #xA, #x9) $B$K$D$$$F$O!"@55,2=$5$l$?CM$K(B
        $B6uGrJ8;z(B (#x20) $B$rDI2C$9$k!#(B
     d) $B$=$NB>$NJ8;z$K$D$$$F$O!"$=$NJ8;z$r@55,2=$5$l$?CM$KDI2C$9$k!#(B

| If the attribute type is not CDATA, then the XML processor must further
| process the normalized attribute value by discarding any leading and
| trailing space (#x20) characters, and by replacing sequences of space (#x20)
| characters by a single space (#x20) character.

$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
$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
$B%9%Z!<%9J8;z(B (#x20) $B$KCV49$7$J$1$l$P$J$i$J$$!#(B

| Note that if the unnormalized attribute value contains a character
| reference to a white space character other than space (#x20),
| the normalized value contains the referenced character itself (#xD,
| #xA or #x9). This contrasts with the case where the unnormalized value
| contains a white space character (not a reference), which is replaced
| with a space character (#x20) in the normalized value and also contrasts
| with the case where the unnormalized value contains an entity reference
| whose replacement text contains a white space character; being recursively
| processed, the white space character is replaced with a space character
| (#x20) in the normalized value.

$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
$B4^$s$G$$$k>l9g!"@55,2=$5$l$?CM$K;2>HJ8;z$=$N$b$N(B (#xD, #xA, #x9) $B$,(B
$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)
$B6uGrJ8;z$,B8:_$9$k>l9g$,$"$k$H$$$&$3$H$r<($7$F$$$k!#$3$l$i$N6uGrJ8;z$O!"(B
$B@55,2=$5$l$?CMFb$G$O%9%Z!<%9J8;z(B (#x20) $B$KCV49$5$l$k!#$^$?!"(B
$B@55,2=$5$l$F$$$J$$CMFb$K!"CV49%F%-%9%H$K6uGrJ8;z$r4^$`<BBN;2>H$,B8:_$9(B
$B$k$3$H$b$"$jF@$k!#$3$N>l9g!"CV49%F%-%9%H$O:F5"E*$K=hM}$5$l$k$?$a!"(B
$B@55,2=$5$l$?CMFb$G$O6uGrJ8;z$O%9%Z!<%9J8;z$KCV49$5$l$k!#(B

| All attributes for which no declaration has been read should be treated by a
| non-validating [E95]processor as if declared CDATA.

$BBEEv@-$r8!>Z$7$J$$%W%m%;%5$O!"@k8@$,FI$_9~$^$l$F$$$J$$B0@-$OA4$F(B
CDATA $B$H$7$F@k8@$5$l$?$b$N$H$_$J$9$N$,K>$^$7$$!#(B

| Following are examples of attribute normalization. Given the following
| declarations:
|
|   <!ENTITY d "&#xD;">
|   <!ENTITY a "&#xA;">
|   <!ENTITY da "&#xD;&#xA;">
|
| the attribute specifications in the left column below would be normalized to
| the character sequences of the middle column if the attribute a is declared
| NMTOKENS and to those of the right columns if a is declared CDATA.
|
|        Attribute specification        | a is NMTOKENS |    a is CDATA
|  -------------------------------------+---------------+-------------------
|   a="                                 | x y z         | #x20 #x20 x y z
|                                       |               |
|   xyz"                                |               |
|  -------------------------------------+---------------+-------------------
|   a="&d;&d;A&a;&a;B&da;"              | A #x20 B      | #x20 #x20 A #x20
|                                       |               | #x20 B #x20 #x20
|  -------------------------------------+---------------+-------------------
|   a="&#xd;&#xd;A&#xa;&#xa;B&#xd;&#xa; | #xD #xD A #xA | #xD #xD A #xA #xA
|                                       | #xA B #xD #xA | B #xD #xD
|
| Note that the last example is invalid (but well-formed) if a is declared
| to be of type NMTOKENS.

$BB0@-CM$N@55,2=$NNc$r0J2<$K<($9!#$^$:!"<!$N$h$&$J@k8@$rM?$($k!#(B

  <!ENTITY d "&#xD;">
  <!ENTITY a "&#xA;">
  <!ENTITY da "&#xD;&#xA;">

$B<!$NI=$O!"1&$N9T$N$h$&$KB0@-$,M?$($i$l$?>l9g!"$=$NB0@-$,(B
NMTOKEN $B$H$7$F@k8@$5$l$F$$$l$P??$sCf$N9T$N$h$&$JJ8;zNs$K@55,2=$5$l!"(B
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

        Attribute specification        | a is NMTOKENS |    a is CDATA
  -------------------------------------+---------------+-------------------
   a="                                 | x y z         | #x20 #x20 x y z
                                       |               |
   xyz"                                |               |
  -------------------------------------+---------------+-------------------
   a="&d;&d;A&a;&a;B&da;"              | A #x20 B      | #x20 #x20 A #x20
                                       |               | #x20 B #x20 #x20
  -------------------------------------+---------------+-------------------
   a="&#xd;&#xd;A&#xa;&#xa;B&#xd;&#xa; | #xD #xD A #xA | #xD #xD A #xA #xA
                                       | #xA B #xD #xA | B #xD #xD

a $B$,(B NMTOKEN $B7?$H$7$F@k8@$5$l$F$$$?>l9g$O!":G8e$NNc$OBEEv$G$O$J$$(B
($B@07A<0$G$O$"$k(B) $B$3$H$KCm0U$;$h!#(B

 ==> Partially Implemented in XMLScan::XMLParser.











# from the ``Namespaces in XML''

| Namespace constraint: Reserved Prefixes and Namespace Names
|
| The prefix xml is by definition bound to the namespace name
| http://www.w3.org/XML/1998/namespace. It may, but need not, be declared,
| and must not be bound to any other namespace name. No other prefix may be
| bound to this namespace name.
|
| The prefix xmlns is used only to declare namespace bindings and is by
| definition bound to the namespace name http://www.w3.org/2000/xmlns/.
| It must not be declared. No other prefix may be bound to this namespace
| name.
|
| All other prefixes beginning with the three-letter sequence x, m, l,
| in any case combination, are reserved. This means that
|
|   * users should not use them except as defined by later specifications
|   * processors must not treat them as fatal errors.
|
| Though legal, it is inadvisable to use prefixed names whose LocalPart
| begins with the letters x, m, l, as these names would be reserved if used
| without a prefix.

Namespace Constraint: $BM=Ls$5$l$?@\F,<-$HL>A06u4VL>(B

$B@\F,<-(B "xml" $B$ODj5A$K$h$jL>A06u4VL>(B "http://www.w3.org/XML/1998/namespace"
$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
$BB>$NL>A06u4VL>$K%P%$%s%I$7$F$O$J$i$J$$!#B>$N@\F,<-$r$3$NL>A06u4VL>$K(B
$B4XO"IU$1$F$O$J$i$J$$!#(B

$B@\F,<-(B "xmlns" $B$OL>A06u4V$N4XO"IU$1$r@k8@$9$k$?$a$@$1$KMQ$$$i$l!"(B
$BDj5A$K$h$jL>A06u4VL>(B "http://www.w3.org/2000/xmlns/" $B$K4XO"IU$1$i$l$k!#(B
$B$3$l$r@k8@$7$F$O$J$i$J$$!#B>$N@\F,<-$r$3$NL>A06u4VL>$K4XO"IU$1$F$O(B
$B$J$i$J$$!#(B

$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
$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
$B$3$l$O<!$N$3$H$r0UL#$9$k!#(B
  * $B8e$N5,3J$GDj5A$5$l$J$$8B$j!"%f!<%6!<$O$3$l$i$r;HMQ$9$k$Y$-$G$O$J$$!#(B
  * $B%W%m%;%5$O$3$l$i$rCWL?E*$J%(%i!<$H$7$F07$C$F$O$J$i$J$$!#(B

$B@\F,<-$,IU$-!"(BLocalPart $B$,(B x, m, l $B$NJ8;z$G;O$^$kL>A0$O$3$N@)Ls$r(B
$BK~$?$7$F$O$$$k$,!"@\F,<-L5$7$GMQ$$$i$l$?>l9g$KM=Ls$5$l$?L>A0$H$J$C$F(B
$B$7$^$&$?$a!"$=$N$h$&$JL>A0$rMQ$$$k$N$O4+$a$i$l$J$$!#(B

 ==> Implemented in XMLScan::XMLNamespace.



| Namespace Constraint: Prefix Declared
|
| The namespace prefix, unless it is xml or xmlns, must have been declared
| in a namespace declaration attribute in either the start-tag of the element
| where the prefix is used or in an an ancestor element (i.e. an element in
| whose content the prefixed markup occurs). [DEL:(*1):DEL]
|
| This constraint may lead to operational difficulties in the case where the
| namespace declaration attribute is provided, not directly in the XML document
| entity, but via a default attribute declared in an external entity.
| Such declarations may not be read by software which is based on a
| non-validating XML processor. Many XML applications, presumably including
| namespace-sensitive ones, fail to require validating processors.
| For correct operation with such applications, namespace declarations must
| be provided either directly or via default attributes declared in the
| internal subset of the DTD.
|
| (*1) The prefix xml is by definition bound to the namespace name
|      http://www.w3.org/XML/1998/namespace. The prefix xmlns is used
|      only for namespace bindings and is not itself bound to any
|      namespace name.

Namespace Constraint: $B@\F,<-$,@k8@$5$l$F$$$k$3$H(B

"xml" $BKt$O(B "xmlns" $B0J30$NL>A06u4V@\F,<-$O!"$=$N@\F,<-$,;HMQ$5$l$F$$$k(B
$BMWAG$N3+;O%?%0$+$=$NAD@h$NMWAG(B ($B$9$J$o$A@\F,<-$N$D$$$?%^!<%/%"%C%W$r(B
$BFbMF$K;}$DMWAG(B) $B$NCf$G!"L>A06u4V@k8@B0@-$K$h$C$F@k8@$5$l$F$$$J$1$l$P(B
$B$J$i$J$$!#(B[DEL:(*1):DEL]

$B$3$N@)Ls$O!"L>A06u4V@k8@B0@-$,(B XML $BJ8=q<BBN$NCf$KD>@\B8:_$9$k$N$G$O$J$/!"(B
$B30It<BBN$G@k8@$5$l$F$$$kB0@-$N%G%U%)%k%H$KB8:_$9$k>l9g!"A`:n>e$N:$Fq$r(B
$B>7$/$@$m$&!#BEEv@-$r8!>Z$7$J$$(BXML$B%W%m%;%5$r85$K$7$?%=%U%H%&%'%"$O!"(B
$B$=$N$h$&$J@k8@$rFI$_9~$^$J$$!#B?$/$N(B XML $B%"%W%j%1!<%7%g%s$O!"L>A06u4V$r(B
$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
$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
$B@k8@$O!"J8=qCf$KD>@\8=$l$k$+!"Kt$OFbIt(BDTD$B%5%V%;%C%H$G@k8@$5$l$F$$$k(B
$BB0@-$N%G%U%)%k%H$K8=$l$J$1$l$P$J$i$J$$!#(B

(*1) $B@\F,<-(B "xml" $B$ODj5A$K$h$jL>A06u4VL>(B
     "http://www.w3.org/XML/1998/namespace" $B$K4XO"IU$1$i$l$k!#(B
     $B@\F,<-(B "xmlns" $B$OL>A06u4V$N4XO"IU$1$r@k8@$9$k$?$a$@$1$KMQ$$$i$l!"(B
     $B$=$l<+?H$O$I$NL>A06u4VL>$K$b4XO"IU$1$i$l$J$$!#(B

 ==> Partially Implemented in XMLScan::XMLNamespace.







| 5.1 Namespace Scoping
|
| [UPD:A namespace declaration is considered to apply to the element where
| it is specified and its attributes, and to all elements and their attributes
| within the content of that element, unless overridden by another namespace
| declaration with the same NSAttName part.:UPD]

5.1 $BL>A06u4V$N%9%3!<%W(B

[UPD:$BL>A06u4V@k8@$O!"F1$8(B NSAttName $BItJ,$r;}$DB>$NL>A06u4V@k8@$K$h$C$F(B
$B>e=q$-$5$l$J$$8B$j!"$=$l$,;XDj$5$l$?MWAG$H$=$NB0@-!"5Z$S$=$NMWAG$N(B
$BFbMF$K$"$kA4$F$NMWAG$H$=$NB0@-$KE,MQ$5$l$k$b$N$H$9$k!#(B:UPD]

 ==> Implemented in XMLScan::XMLNamespace.


| 5.2 Namespace Defaulting
|
| [UPD:A default namespace declaration is considered to apply to the element
| where it is specified, and to all elements within the content of that
| element, unless overridden by another default namespace declaration.:UPD]

5.2 $BL>A06u4V$N%G%U%)%k%H(B

[UPD:$B%G%U%)%k%HL>A06u4V@k8@$O!"B>$N%G%U%)%k%HL>A06u4V@k8@$K$h$C$F>e=q$-(B
$B$5$l$J$$8B$j!"$=$l$,;XDj$5$l$?MWAG5Z$S$=$NMWAG$NFbMF$K$"$kA4$F$NMWAG$K(B
$BE,MQ$5$l$k$b$N$H$9$k!#(B:UPD]

 ==> Implemented in XMLScan::XMLNamespace.


| 5.3 Uniqueness of Attributes
|
| In XML documents conforming to this specification, no tag may contain two
| attributes which:
|
|  1. have identical names, or
|  2. have qualified names with the same local part and with prefixes which
|     have been bound to namespace names that are identical.

5.3 $BB0@-$N0l0U@-(B

$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
$B$G$-$J$$!#(B

  1. $BF10l$NL>A0$r;}$D!#Kt$O(B
  2. $BF1$8%m!<%+%k%Q!<%H$HF10l$NL>A06u4VL>$KB+G{$5$l$F$$$k@\F,<-$+$i$J$k(B
     $B=$>~L>(B (qualified name) $B$r;}$D!#(B

 ==> Implemented in XMLScan::XMLNamespace.




| 6. Conformance of Documents
|
| This specification applies to XML 1.0 documents. To conform to this
| specification, a document must be well-formed according to the XML 1.0
| specification.
|
| In XML documents which conform to this specification, element types and
| attribute names must match the production for QName and must satisfy the
| "Namespace Constraints". All other tokens in the document which are
| required, for XML 1.0 well-formedness, to match the XML production for
| Name, must match this specification's production for NCName.
|
| Definition: A document is namespace-well-formed if it conforms to this
| specification.
|
| It follows that in a namespace-well-formed document
|   * All element types and attribute names contain either zero or one colon;
|   * No entity names, PI targets, or notation names contain any colons.
|
| In addition, a namespace-well-formed document may also be namespace-valid.
|
| Definition: A namespace-well-formed document is namespace-valid if it is
| valid according to the XML 1.0 specification, and all tokens other than
| element types and attribute names which are required, for XML 1.0 validity,
| to match the XML production for Name, match this specification's production
| for NCName.
|
| It follows that in a namespace-valid document
|   * No attributes with a declared type of ID, IDREF(S), ENTITY(IES) or
|     NOTATION contain any colons.

6. $BJ8=q$NE,9g@-(B

$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
$BJ8=q$O(B XML 1.0 $B5,3J$N8@$&@07A<0$G$J$1$l$P$J$i$J$$!#(B

$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
$B%^%C%A$7!"$+$DL>A06u4V@)Ls(B (Namespace Constraints) $B$rK~$?$5$J$1$l$P(B
$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
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
$B%^%C%A$7$J$1$l$P$J$i$J$$!#(B

$BDj5A(B: $B$"$kJ8=q$,$3$N5,3J$KE,9g$7$F$$$k$H$-!"$=$NJ8=q$rL>A06u4V@07A<0(B
(namespace-well-formed) $B$N(BXML$BJ8=q$H8F$V!#(B

$BL>A06u4V@07A<0$G$"$kJ8=q$O!"<!$N>r7o$rK~$?$9!#(B
  * $BA4$F$NMWAG7?$HB0@-L>$O(B0$B8D$+(B1$B8D$N%3%m%s$r4^$`!#(B
  * $B<BBNL>!"=hM}L?Na$N%?!<%2%C%HL>!"5Z$S5-K!L>$O%3%m%s$r4^$^$J$$!#(B

$B$^$?!"L>A06u4V@07A<0$G$"$kJ8=q$OF1;~$KL>A06u4VBEEv(B (namespace-valid)
$B$G$"$C$F$b$h$$!#(B

$BDj5A(B: $BL>A06u4V@07A<0$G$"$kJ8=q$,(B XML 1.0 $B5,3J$GBEEv$G$"$j!"$+$D(B
$BMW5a$5$l$kMWAG7?$HB0@-L>$r=|$/A4$F$N%H!<%/%s$,!"(BXML 1.0 $B$NBEEv@-$N(B
$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
NCName $B$K%^%C%A$7$F$$$k$H$-!"$=$NJ8=q$rL>A06u4VBEEv$J(BXML$BJ8=q$H8F$V!#(B

$BL>A06u4VBEEv$JJ8=q$O!"<!$N>r7o$rK~$?$9!#(B
  * ID, IDREF, ENTITY, $B5Z$S(B NOTATION $B7?$K@k8@$5$l$?B0@-$O%3%m%s$r(B
    $B4^$^$J$$!#(B
