Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
C++-SCA-Next
-
None
-
None
-
WinXP
Description
We have a schema file that defines an atom feed. It specified elementFormDefault="qualified" so that lower level elements should be in the target namespace. I will attach the schema as a separate file. With a very simple php test case as follows:
$xmldas = SDO_DAS_XML::create('Atom1.0.xsd');
$document = $xmldas->createDocument('http://www.w3.org/2005/Atom','entry');
$entry = $document->getRootDataObject();
$author = $entry->createDataObject('author');
$author->name[] = "Caroline Maynard";
print $xmldas->saveString($document,2);
we get
<?xml version="1.0" encoding="UTF-8"?>
<tns:entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.w3.org/2005/Atom">
<tns:author>
<name>Caroline Maynard</name>
</tns:author>
</tns:entry>
whereas we should see the <name> element in the tns namespace.
I have checked this with XERCES: the xml that we are generating will not validate, whereas if I alter it to have <name> in the tns namespace it will.