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

xerces-c reports "Base type definition does not have any attributes" for a valid complex type restriction

    XMLWordPrintableJSON

Details

    Description

      Hi there,

      xerces-c reports "Base type definition does not have any attributes" for a valid complex type restriction.
      This bug appears only if we have a element recursion and the attributes are explicitly defined in the restricted type definition.

      sample schema:

      <?xml version="1.0" encoding="UTF-8"?>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

      <xs:complexType name="A">
      <xs:sequence>
      <xs:element name="elem" type="B" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="foo"/>
      </xs:complexType>

      <xs:complexType name="B">
      <xs:sequence>
      <xs:element name="elem" type="C" minOccurs="0"/>
      </xs:sequence>
      </xs:complexType>

      <xs:complexType name="C">
      <xs:complexContent>
      <xs:restriction base="D">
      <xs:attribute name="foo"/>
      </xs:restriction>
      </xs:complexContent>
      </xs:complexType>

      <xs:complexType name="D">
      <xs:complexContent>
      <xs:restriction base="A">
      <xs:attribute name="foo"/>
      </xs:restriction>
      </xs:complexContent>
      </xs:complexType>

      </xs:schema>

      Cheers,
      Christian Will

      Attachments

        Activity

          People

            Unassigned Unassigned
            nukleon Christian Will
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: