php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57911 unable to access an XSD property containing a hyphen (-)
Submitted: 2007-11-14 09:29 UTC Modified: 2007-12-04 09:50 UTC
From: hbandstra at gmail dot com Assigned: TUSCANY (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.2.1 OS: Linux
Private report: No CVE-ID: None
 [2007-11-14 09:29 UTC] hbandstra at gmail dot com
Description:
------------
I have an XSD file with properties containing hyphens (portfolio-id). I can't get it to accept any changes to the properties. In part this is because php doesn't accept hypens in variable names, but other methods like $messagebody['portfolio-id'] should work.

Reproduce code:
---------------
$xmldas = SDO_DAS_XML::create('xsd/pre_qual_wso.xsd');
$messagebody = $xmldas->createDataObject('','MessagebodyType');

// This gives a syntax error
$messagebody->portfolio-id     = 'BST';

// These alternatives do not work
$messagebody['portfolio-id']   = 'BST';
$messagebody[0]                = 'BST';
$messagebody->{'portfolio-id'} = 'BST';

Expected result:
----------------
I expected that the alternative methods would work.

Actual result:
--------------
Trying the "alternative" methods returned this error:
Problem creating an XML document: DataObjectImpl::setSDOValue -

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-21 09:13 UTC] simonslaws at googlemail dot com
Discussion started on the Tuscany list for this issue.

http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg25776.html

No feedback yet
 [2007-12-04 09:50 UTC] cem@php.net
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 checked in to FULMAR branch, and will be in next release.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jan 20 20:03:35 2022 UTC