Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-660

Validator not recognizing root level XML element

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Incomplete
    • 2.3.0
    • None
    • XNI
    • None
    • Operating System: Windows XP
      Platform: PC
    • 17951

    Description

      I have a XMLGrammarPool in which I store all my schemas - each schema has the
      same targetNamespace. Whenever I try to validate any XML instance (using SAX
      or DOM implementations), I get the following type of error...

      Here, ADDRESS_VALIDATION_OUTPUT is the root level element of the XML document -
      this happens for all the root level elements...

      The XML instance doc:
      <?xml version="1.0" encoding="UTF-8"?>
      <ADDRESS_VALIDATION_OUTPUT xmlns="http://www.telcordia.com"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:
      schemaLocation="http://www.telcordia.com ADDRESS_VALIDATION_OUTPUT.xsd"
      version="ELMS6_ADDRESS_VALIDATION_OUTPUT_v1-0">
      ...

      The XML Schema doc:
      <?xml version="1.0" encoding="UTF-8"?>
      <xsd:schema targetNamespace="http://www.telcordia.com" xmlns:
      xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.telcordia.com"
      elementFormDefault="qualified" attributeFormDefault="unqualified">
      <xsd:element name="ADDRESS_VALIDATION_OUTPUT">
      <xsd:complexType>
      <xsd:all>
      ...

      Oddly enough, it seems to understand the rest of the document and validates
      everything else properly.

      Note: Full-checking is turned on.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dbassu@research.telcordia.com Devasis Bassu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: