Consider this portion of 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>


In particular, these lines:

         <xsd:attribute name="submissionID" type="xsd:string"/>
         <xsd:attribute name="submissionFileName" type="xsd:string"/>
         <xsd:attribute name="submissionFileCreatedDate" type="xsd:date"/>


When I use generateDS to generate a class for SubmissionDataType and 
then construct an instance like so:

         submission = edwr.SubmissionDataType(
             LabReport=[createLabReport(),],
             submissionFileName=filename,
             submissionFileCreatedDate=str(datetime.date.today()),
             submissionID="1")


It generates this XML:

<EN:SubmissionDataType submissionFileName="pb_test.edwr" 
submissionFileCreatedDate="2008-07-17" submissionID="1">

xmllint doesn't like that.  It is expecting this instead:

<EN:SubmissionDataType EN:submissionFileName="pb_test.edwr" 
EN:submissionFileCreatedDate="2008-07-17" EN:submissionID="1">


I'm a newbie to XML schema and I don't understand why it expects an EN 
namespace for those attributes, but it does.

Randall


-------------------------------------------------------------------------
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
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to