Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1970

Lax validation skips "known" child elements but partially processes IDs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0, 3.0.1, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4
    • Fix Version/s: None
    • Labels:
      None

      Description

      When schema wildcards have lax validation, Xerces apparently skips unknown children, as it should, but fails to validate known/recognized children nested further in the tree, which I'm led to believe is not compliant.

      What's more concerning is that in ignoring such children, the parser still recognizes attributes of type "ID" and places them into the ID map for the document, but does NOT detect or report validation errors if those ID values collide with others in the document. Either handle them as an ID or not, but don't do it halfway.

      An example like so:

      <Known ID="foo">
      <Extensions>
      <Unknown>
      <Known ID="foo">

      If Extensions is lax, the spec apparently requires that the nested <Known> element also be validated, but not only does Xerces not do this, it fails to detect the duplicate ID, BUT inserts both ID attributes into the map that getElementById uses.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              scantor Scott Cantor
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: