|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-09-14 04:32 UTC] simonslaws at googlemail dot com
Description:
------------
SDO won't load my complex type that extends a simple type in order to add an attribute
Reproduce code:
---------------
I believe this is valid schema
<complexType name="ComplexTypeExtendingSimpleTypeType">
<simpleContent>
<extension base="tns:SimpleTypeWithNameType">
<attribute name="AddedByExtension" type="string"/>
</extension>
</simpleContent>
</complexType>
<element name="RootElement25">
<complexType>
<sequence>
<element name="ComplexTypeExtendingSimpeType" type="tns:ComplexTypeExtendingSimpleTypeType"/>
</sequence>
</complexType>
</element>
Expected result:
----------------
To be loaded into the SDO type model
Actual result:
--------------
Exception in PHP Interop test: Cannot add property AddedByExtension of type commonj.sdo#String to this data type http://www.apache.org/tuscany/interop#ComplexTypeExtendingSimpleTypeType
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 12:00:01 2025 UTC |
I get the same result for restriction also: <complexType name="ComplexTypeSimpleContentRestrictingComplexTypeType"> <simpleContent> <restriction base="tns:ComplexTypeExtendingSimpleTypeType"> <attribute name="AddedByExtension" type="NCName" /> </restriction> </simpleContent> </complexType> <element name="RootElement27"> <complexType> <sequence> <element name="ComplexTypeSimpleContentRestrictingComplexType" type="tns:ComplexTypeSimpleContentRestrictingComplexTypeType"/> </sequence> </complexType> </element>Please find above my description of the problem. It seems that you can't have a complex type that extends a simple type. I tried with your new version of SDO 1.2.0, same problem. <?php try { $xmldas = SDO_DAS_XML::create("./ddex_xsd/dsr.xsd"); print($xmldas); } catch (SDO_Exception $e) { print($e->getMessage()); } ?> but I get this execption : Cannot add property Namespace of type commonj.sdo#String to this data type http://ddex.net/xml/2006/dsrm/10#CommercialModelType Official XSD file can be downloaded here : http://ddex.net/xml/2006/dsrm/10/dsr.xsd WFX