php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58038 Repeated nill elements of extended type cause "Parser found unknown element" ex
Submitted: 2008-02-11 10:02 UTC Modified: 2008-02-14 13:09 UTC
From: slaws@php.net Assigned: TUSCANY-2041 (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.2.0 OS: XP SP2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: slaws@php.net
New email:
PHP Version: OS:

 

 [2008-02-11 10:02 UTC] slaws@php.net
Description:
------------
The SDO fails to read a file with repeated nill elements when the type is and extension of a simple type. This has been reported in Tuscany as https://issues.apache.org/jira/browse/TUSCANY-2041

Reproduce code:
---------------
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>



Expected result:
----------------
Successfully parsed input

Actual result:
--------------
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] =>
) 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-14 13:06 UTC] simonslaws at googlemail dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Fixed in FULMAR based on changes made in Tuscany C++ SDO under JIRA https://issues.apache.org/jira/browse/TUSCANY-2041
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri May 27 21:05:46 2022 UTC