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

error validating parser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0
    • DOM
    • None
    • Operating System: All
      Platform: All
    • 14955

    Description

      Following XML data and schema file are used.

      XML Schema file:

      <?xml version="1.0" encoding="UTF-8"?>
      <schema targetNamespace="http://www.kpit.com/kpi/I"
      xmlns="http://www.w3.org/2001/XMLSchema"
      xmlns:kpi="http://www.kpit.com/kpi/I"
      elementFormDefault="qualified">
      <complexType name="data_type">
      </complexType>
      <complexType name="Array">
      <complexContent>
      <extension base="kpi:data_type">
      <sequence>
      <element name="element_type"
      type="kpi:data_type"/>
      </sequence>
      </extension>
      </complexContent>
      </complexType>
      <complexType name="Integer">
      <complexContent>
      <extension base="kpi:data_type">
      <sequence>
      <element name="display_format">
      <simpleType>
      <restriction
      base="string">
      <enumeration
      value="decimal"/>
      <enumeration
      value="hex"/>
      </restriction>
      </simpleType>
      </element>
      </sequence>
      </extension>
      </complexContent>
      </complexType>
      <complexType name="parameter">
      <sequence>
      <element name="data_type" type="kpi:data_type"/>
      </sequence>
      </complexType>
      <complexType name="File">
      </complexType>

      <element name="config">
      <annotation>
      <documentation>File which contains meta-data for
      parameters, TIS's, and operations in particular GTIS version.</documentation>
      </annotation>
      <complexType>
      <complexContent>
      <extension base="kpi:File">
      <choice minOccurs="0"
      maxOccurs="unbounded">
      <element name="parameter"
      type="kpi:parameter"/>
      </choice>
      </extension>
      </complexContent>
      </complexType>
      </element>
      </schema>

      XML file:

      <?xml version="1.0" encoding="UTF-8"?>
      <config
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.kpit.com/kpi/I temp1.xsd"
      xmlns="http://www.kpit.com/kpi/I">

      <parameter>
      <data_type xsi:type="Array">
      <element_type xsi:type="Array">
      <element_type xsi:type="Integer">
      <display_format>hex</display_format>
      </element_type>
      </element_type>
      </data_type>
      </parameter>

      </config>

      We are using DOMCount example and validating XML file against the schema file
      file. We are getting below error:

      Error at file e:\temp1.xml, line 14, char 13
      Message: No character data is allowed by content model

      Errors occurred, no output available

      Jaydip & Vandana

      Attachments

        Activity

          People

            Unassigned Unassigned
            jaydipm@kpit.com Jaydip Mehta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: