|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57806 <all> is not enforced
Submitted: 2007-08-28 17:34 UTC Modified: 2017-01-10 08:09 UTC
From: mattsch at gmail dot com Assigned:
Status: Suspended Package: SCA_SDO (PECL)
PHP Version: 5.2.3 OS: Gentoo Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mattsch at gmail dot com
New email:
PHP Version: OS:


 [2007-08-28 17:34 UTC] mattsch at gmail dot com
I should not be able to add more than one of the same element  in the <all> constraint.

Reproduce code:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="">

<xsd:element name="request" type="requestType"/>

<xsd:complexType name="requestType" abstract="true"/>

<xsd:complexType name="collectionInfo">
    <xsd:extension base="requestType">
        <xsd:element name="collection" type="xsd:token" maxOccurs="unbounded"/>
        <xsd:element name="collection2" type="xsd:token"/>
      <xsd:attribute name="kind" type="xsd:string" fixed="collectionInfo"/>

<xsd:element name="request-list">
        <xsd:element ref="request" minOccurs="0" maxOccurs="unbounded"/>



try {
	$xmldas = SDO_DAS_XML::create("request.xsd");
	try {
		$doc = $xmldas->createDocument('', 'request-list');
		$rdo = $doc->getRootDataObject();
		$request = $xmldas->createDataObject('', 'collectionInfo');
		$request->collection->insert('foo bar');
		$request->collection->insert('foo2 bar2');
		$request->kind = 'collectionInfo';
	} catch (SDO_Exception $e) {
} catch (SDO_Exception $e) {
	print("Problem creating an XML document: " . $e->getMessage());


Expected result:
This should throw an exception because it should not be possible to set maxOccurs > 1 for elements within <all>

Actual result:
<?xml version="1.0" encoding="UTF-8"?>
<request-list xmlns:xsi=""><request xsi:type="collectionInfo" kind="collectionInfo"><collection>foo bar</collection><collection>foo2 bar2</collection></request></request-list>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-28 17:34 UTC] mattsch at gmail dot com
Changed php version.
 [2017-01-10 08:09 UTC]
-Status: Open +Status: Suspended
 [2017-01-10 08:09 UTC]
Suspending this report as the extension have not had a release for almost 9 years.  Please revive this if the extension once again shows life
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 17:01:27 2024 UTC