--- markup/xml/xmlcc/xmlcc-work.en.html 2007/12/01 12:19:41 1.17 +++ markup/xml/xmlcc/xmlcc-work.en.html 2007/12/01 14:32:30 1.18 @@ -365,17 +365,19 @@

The algorithm -to +to validate an NCName (name) is defined as following:

  1. @@
-

To validate +

To +validate a public identifier (pid), the -algorithm below MUST be used:

+following algorithm MUST be used:

    +
  1. If pid is null, abort these steps.
  2. If pid contains any character that is outside of the range of #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%], @@ -392,10 +394,34 @@ U+0020 SPACE character immediately followed by another U+0020 SPACE character in pid, then it is a - round-trip-error.
  3. + round-trip-error. + Is this really a roundtripness problem? XML spec + does only define the way to match public identifiers in fact, no + canonical form.
  4. @@ Should we check formal-public-identifierness?
+

To +validate +a system identifier (sid), the +following algorithm MUST be used:

+
    +
  1. If sid is null, abort these steps.
  2. +
  3. If sid contains both U+0022 + QUOTATION MARK (") and + U+0027 APOSTROPHE + (') characters, raise an + xml-well-formedness-error.
  4. +
  5. If sid contains at least one U+0023 + NUMBER SIGN (#) + character, then raise an + xml-misc-error.
  6. +
  7. @@ If sid cannot be converted to a URI + reference, then raise a fact-level error (xml-misc-warning?).
  8. +
+
@@ -408,10 +434,10 @@
If n is an Attr node
    -
  1. Validate the +
  2. Validate the localName attribute value as an NCName.
  3. If the prefix attribute value is different from - null, then validate + null, then validate the prefix attribute value as an NCName.
  4. For each node nc in the childNodes list of n, @@ -630,7 +656,7 @@
    If n is a DocumentType node
      -
    1. Validate the +
    2. Validate the nodeName attribute value as an NCName.
    3. Follow the following substeps:
        @@ -649,11 +675,13 @@
      1. Validate the publicId attribute value as a public identifier.
      2. -
      3. If the systemId attribute value contains - both " and ' characters, it is a - xml-well-formedness-error.
      4. - - +
      5. Validate + the systemId attribute value as a system identifier.
      6. +
      7. If the publicId attribute value of n is + not null and the systemId attribute + value of n is null, then raise an + xml-well-formedness-error. + @@ publicId == null? Or, publicId == ""
      8. For each node nc in the childNodes list of n,
          @@ -665,17 +693,20 @@ check nc recusrively.
      9. -
      10. @@ entities, notations, - elementTypes, externally declared?
      11. +
      12. For each node in the entities, notations, + and elementTypes lists of n, + check the + node recursively.
      13. +
      14. @@ externally declared?
    If n is an Element node
      -
    1. Validate the +
    2. Validate the localName attribute value as an NCName.
    3. If the prefix attribute value is different from - null, then validate + null, then validate the prefix attribute value as an NCName.
    4. For each node nc in the childNodes list of n, @@ -694,8 +725,18 @@ nc recursively.
  5. @@ #elementvalid Validity constraint: Element Valid
  6. -
  7. @@ #uniqattspec Well-formedness constraint: Unique Att Spec
  8. -
  9. @@ #RequiredAttr Validity constraint: Required Attribute
  10. +
  11. Let attrs be the value of the attribute + attribute of n. Check conformance of attrs + as following: +
      +
    1. If attrs contains an Attr node whose + nodeName attribute value is equal to that of another + Attr node in attrs, then raise an + xml-well-formedness-error.
    2. +
    3. @@ #RequiredAttr Validity constraint: Required Attribute
    4. +
    +
If n is an ElementTypeDefinition node
@@ -723,20 +764,23 @@
  • "For interoperability, the same Nmtoken SHOULD NOT occur more than once in the enumerated attribute types of a single element type."
  • -
    If n is an Entity node
    +
    If n is an Entity node whose +notationName attribute value is null (i.e. a +parsed entity)
      -
    1. An entity-error @@ if !notationName.
    2. -
    3. Validate the +
    4. Raise an + entity-error.
    5. +
    6. Validate the nodeName attribute value as an NCName.
    7. Validate the publicId attribute value as a public identifier.
    8. -
    9. If the systemId attribute value contains - both " and ' characters, it is a - xml-well-formedness-error.
    10. - -
    11. @@ notationName
    12. -
    13. @@ #not-declared Validity constraint: Notation Declared
    14. +
    15. Validate + the systemId attribute value as a system identifier.
    16. +
    17. If the publicId attribute value of n is + not null and the systemId attribute + value of n is null, then raise an + xml-well-formedness-error.
    18. For each node nc in the childNodes list of n,
        @@ -755,11 +799,34 @@
    +
    If n is an Entity node whose +notationName attribute value is not null +(i.e. an unparsed entity)
    +
    +
      +
    1. Validate the + nodeName attribute value as an NCName.
    2. +
    3. Validate + the publicId attribute value as a public identifier.
    4. +
    5. Validate + the systemId attribute value as a system identifier.
    6. +
    7. If the systemId attribute value of n is + null, then raise an + xml-well-formedness-error.
    8. +
    9. Validate the + notationName attribute value of n as an + NCName.
    10. +
    11. @@ #not-declared Validity constraint: Notation Declared
    12. +
    13. If the childNodes list of n contains + any nodes, they are in + xml-well-formedness-error.
    14. +
    +
    If n is an EntityReference node
    1. An entity-error.
    2. -
    3. Validate the +
    4. Validate the nodeName attribute value as an NCName.
    5. For each node nc in the childNodes list of n, @@ -782,13 +849,12 @@
      If n is a Notation node
        -
      1. Validate the +
      2. Validate the nodeName attribute value as an NCName.
      3. Validate the publicId attribute value as a public identifier.
      4. -
      5. If the systemId attribute value contains - both " and ' characters, it is a - xml-well-formedness-error.
      6. +
      7. Validate + the systemId attribute value as a system identifier.
      8. If the childNodes list of n contains any nodes, they are in xml-well-formedness-error.
      9. @@ -800,7 +866,7 @@
      10. If the target attribute value matches to the string xml in any case combination, then raise a xml-well-formedness-error.
      11. -
      12. Otherwise, validate the +
      13. Otherwise, validate the target attribute value as an NCName.
      14. Then, validate