<http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work>
<http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc>
<http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work>
<http://suika.fam.cx/gate/cvs/markup/xml/xmlcc/xmlcc-work.en.html>
© Wakaba.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front‐Cover Texts, and no Back‐Cover
Texts. A copy of the license is
available at <http://www.gnu.org/copyleft/fdl.html>
.
This section describes the status of this document at the time of its publication. Other documents might supersede this document.
This document is a working draft, produced as part of the
Whatpm
subproject of the
manakai
project. It might be updated, replaced, or obsoleted by
other documents at any time. It is inappropriate to
cite this document as other than work in progress
.
Comments on this document are welcome and may be sent to the author.
Translations of thie document might be available. The English version of the document is the only normative version.
This section is non‐normative.
The key words MUST
,
MUST NOT
,
SHOULD
,
SHOULD NOT
, and
MAY
in this
document are to be interpreted as described in
RFC
2119
[KEYWORDS].
All examples and notes in this specification are non‐normative, as are all sections explicitly marked non‐normative. Everything else in this specification is normative.
Algorithm is normative but non-normative. In addition, the order in which errors are raised is undefined.
The following algorithms and definitions are applied to XML documents; especially, they are not applied to HTML documents.
If a Document
node has no
xml-well-formedness-error, entity-error, and unknown-error,
then it is well-formed. If a well-formed Document
node has no xml-validity-error, it is valid.
A well‐formed Document
can be safely serialized
into a well‐formed XML document. A valid Document
can be easily serialized into a valid XML document.
Errors are classified into these error categories:
entity-error
round-trip-error
unknown-error
?xml-misc-error
xml-misc-fatal-error
xml-validity-error
xml-well-formedness-error
If an xml-well-formedness-error
is raised,
it would not be possible to generate an XML serialization that
would match to the appropriate production rule and that would not
violate to any well‐formedness constraint in XML
specification [XML10,
XML11].
@@ TODO: #dt-atuseroption at user option (MAY or MUST), #dt-compat for compatibility, #dt-interop for interoperability
The XML version of a node is
the XML version of the document to which the node belongs.
For a Documemt
node, the XML version
of the document is the value of the xmlVersion
attribute. For a DocumentType
node whose
ownerDocument
is set to null
,
the XML version of the document is 1.0
.
For any other node, the XML version of the document
is that of the Document
node contained in the
ownerDocument
attribute of the node.
The algorithm to check a node (n) is defined as following:
Attr
nodelocalName
attribute value as an NCName
.prefix
attribute value is different from
null
, then validate
the prefix
attribute value as an NCName
.childNodes
list of n contains
a node which is not Text
or
EntityReference
node, then it is a
xml-well-formedness-error
.childNodes
list of n contains
an EntityReference
node, it is an
entity-error
.EntityReference
in
childNodes
list of n recursively.specified
,
manakaiAttributeType
AttributeDefinition
nodeCDATASection
nodedata
attribute value as an XML character
data.data
attribute value contains
a string ]]>
, then it is a
xml-well-formedness-error
.childNodes
list of n contains
any nodes, they are in
xml-well-formedness-error
s.Comment
nodedata
attribute value as an XML character
data.data
attribute value contains
a string --
, or if it ends with a character
-
, then it is a
xml-well-formedness-error
.childNodes
list of n contains
any nodes, they are in
xml-well-formedness-error
s.Document
node1.0
or 1.1
,
then it is an unknown-error?
.xmlEncoding
attribute value does not
match to [A-Za-z] ([A-Za-z0-9._] | '-')*
@@ formal def, then it is a
xml-well-formedness-error
.childNodes
list of n have to
consist of zero or more Comment
and/or
ProcessingInstruction
nodes, followed by
an optional DocumentType
node, followed
by zero or more Comment
and/or
ProcessingInstruction
nodes, followed by
an Element
node, followed
by zero or more Comment
and/or
ProcessingInstruction
nodes. Any violation to this is a
xml-well-formedness-error
.EntityReference
in
childNodes
list of n recursively.allDeclarationsProcessed
DocumentFragment
nodechildNodes
list of n contains
a node which is not Element
,
Text
, CDATASection
, Comment
,
ProcessingInstruction
, or
EntityReference
node, then it is a
xml-well-formedness-error
.childNodes
list of n contains
an EntityReference
node, it is an
entity-error
.EntityReference
in
childNodes
list of n recursively.DocumentType
nodenodeName
attribute value as an NCName
.publicId
attribute value contains any character
that is outside of the range of #x20 |
[a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
,
or contains a leading U+0020
character,
a trailing U+0020
character, or a
sequence of two or more U+0020
characters,
then it is a
xml-well-formedness-error
.systemId
attribute value contains
both "
and '
characters, it is a
xml-well-formedness-error
.childNodes
list of n contains
a node which is not ProcessingInstruction
node,
then it is a
xml-well-formedness-error
.
@@ ref to manakai's extensionsEntityReference
in
childNodes
list of n recursively.entities
, notations
,
elementTypes
, externally declared?Element
nodelocalName
attribute value as an NCName
.prefix
attribute value is different from
null
, then validate
the prefix
attribute value as an NCName
.childNodes
list of n contains
a node which is not Element
,
Text
, CDATASection
, Comment
,
ProcessingInstruction
, or
EntityReference
node, then it is a
xml-well-formedness-error
.childNodes
list of n contains
an EntityReference
node, it is an
entity-error
.EntityReference
in
childNodes
list of n recursively.ElementTypeDefinition
nodeEntity
nodeentity-error
@@ if !notationName.nodeName
attribute value as an NCName
.publicId
attribute value contains any character
that is outside of the range of #x20 |
[a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
,
or contains a leading U+0020
character,
a trailing U+0020
character, or a
sequence of two or more U+0020
characters,
then it is a
xml-well-formedness-error
.systemId
attribute value contains
both "
and '
characters, it is a
xml-well-formedness-error
.notationName
childNodes
list of n contains
a node which is not Element
,
Text
, CDATASection
, Comment
,
ProcessingInstruction
, or
EntityReference
node, then it is a
xml-well-formedness-error
.childNodes
list of n contains
an EntityReference
node, it is an
entity-error
.EntityReference
in
childNodes
list of n recursively.EntityReference
nodeentity-error
.nodeName
attribute value as an NCName
.childNodes
list of n contains
a node which is not Element
,
Text
, CDATASection
, Comment
,
ProcessingInstruction
, or
EntityReference
node, then it is a
xml-well-formedness-error
.childNodes
list of n contains
an EntityReference
node, it is an
entity-error
.EntityReference
in
childNodes
list of n recursively.Notation
nodenodeName
attribute value as an NCName
.publicId
attribute value contains any character
that is outside of the range of #x20 |
[a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
,
or contains a leading U+0020
character,
a trailing U+0020
character, or a
sequence of two or more U+0020
characters,
then it is a
xml-well-formedness-error
.systemId
attribute value contains
both "
and '
characters, it is a
xml-well-formedness-error
.childNodes
list of n contains
any nodes, they are in
xml-well-formedness-error
s.ProcessingInstruction
nodetarget
attribute value as an NCName
.target
attribute value matches to
XML
case-insensitively, then it is a
xml-well-formedness-error
.data
attribute value as an XML character
data.data
attribute value contains
a string ?>
, or starts with either
U+0009
, U+000A
,
U+000D
, or U+0020
character, then it is a
round-trip-error
.childNodes
list of n contains
any nodes, they are in
xml-well-formedness-error
s.Text
nodedata
attribute value as an XML character
data.childNodes
list of n contains
any nodes, they are in
xml-well-formedness-error
s.The algorithm to validate an XML character data (s) is defined as following:
The algorithm
to validate a
Name
(name) is defined
as following:
The algorithm
to
validate an NCName
(name)
is defined as following:
This section is non‐normative.
...
<http://www.w3.org/TR/xml>
.
This version of the specification is referenced.<http://www.w3.org/TR/CSS21>
.<http://dev.w3.org/csswg/cssom/Overview.html>
.<http://dev.w3.org/2006/webapi/selectors-api/Overview.html>
.
The latest published version of the specification is available at
<http://www.w3.org/TR/selectors-api/>
.<http://www.w3.org/TR/xbl/>
.