Given this type definition in a schema:
**************************************************************
<xsd:complexType name="SubmissionDataType">
<xsd:annotation>
<xsd:documentation>Transction information</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element ref="EN:LabReport" minOccurs="0"
maxOccurs="unbounded"/>
<xsd:element ref="EN:SubmissionCertification" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="submissionID" type="xsd:string"/>
<xsd:attribute name="submissionFileName" type="xsd:string"/>
<xsd:attribute name="submissionFileCreatedDate" type="xsd:date"/>
</xsd:complexType>
**************************************************************
generateDS produces this exportAttributes method:
**************************************************************
def exportAttributes(self, outfile, level, namespace_='EN:',
name_='SubmissionDataType'):
if self.get_submissionFileName() is not None:
outfile.write(' submissionFileName="%s"' %
(quote_attrib(self.get_submissionFileName()), ))
if self.get_submissionFileCreatedDate() is not None:
outfile.write(' submissionFileCreatedDate="%s"' %
(quote_attrib(self.get_submissionFileCreatedDate()), ))
if self.get_submissionID() is not None:
outfile.write(' submissionID="%s"' %
(quote_attrib(self.get_submissionID()), ))
**************************************************************
Note the portion, outfile.write(' submissionFileName="%s"'
It does not include the namespace for submissionFileName. When I
validate a generated XML file with xmllint, it expects this:
<EN:Submission EN:submissionFileName="tcr_test.xml"
EN:submissionFileCreatedDate="2008-10-08" EN:submissionID="1">
But, what is generated this this:
<EN:Submission submissionFileName="tcr_test.xml"
submissionFileCreatedDate="2008-10-08" submissionID="1">
--
Randall Smith
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
generateds-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/generateds-users