Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-2041

Repeated nill elements of extended type cause "Parser found unknown element" exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • C++-SCA-Next
    • None
    • C++ SDO
    • None
    • XP SP2, VC7

    Description

      With the schema

      <schema xmlns="http://www.w3.org/2001/XMLSchema"
      targetNamespace="http://www.example.org/AnnonTypes"
      xmlns:tns="http://www.example.org/AnnonTypes" elementFormDefault="qualified">

      <element name="Top">
      <complexType>
      <sequence>
      <element name="attribute" nillable="true" minOccurs="0" maxOccurs="unbounded">
      <complexType>
      <simpleContent>
      <extension base="string">
      <attribute name="name" type="string" use="required"/>
      </extension>
      </simpleContent>
      </complexType>
      </element>
      </sequence>
      </complexType>
      </element>
      </schema>

      And XML

      <tns:Top xmlns:tns="http://www.example.org/AnnonTypes"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.example.org/AnnonTypes AnnonTypes2.xsd ">

      <tns:attribute name="ABC" xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
      <!--tns:attribute name="DEF" xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
      <tns:attribute name="GHI" xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
      <tns:attribute name="JKL" xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"-->
      </tns:Top>

      When multiple attribute elements are present the following error is reported.

      SDO_DAS_XML_ParserException Object
      (
      [message:protected] => SDO_DAS_XML::loadFile - Unable to parse the supplied
      xml file
      1 parse error(s) occurred when parsing the file 'AnnonTypes2.xml':
      1. Parser found unknown element attribute

      [string:private] =>
      [code:protected] => 0
      file:protected => C:\simon\php\workspace\php-branch\phpscripts\chrisdougla
      s\test.php
      [line:protected] => 52
      [trace:private] => Array
      (
      [0] => Array
      (
      [file] => C:\simon\php\workspace\php-branch\phpscripts\chris
      douglas\test.php
      [line] => 52
      [function] => loadFile
      [class] => SDO_DAS_XML
      [type] => ->
      [args] => Array
      (
      [0] => AnnonTypes2.xml
      )

      )

      )

      [cause] =>
      )

      Attachments

        Activity

          People

            robbinspg Peter George Robbins
            simonslaws Simon Laws
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: