Randall says:
> A class Receiver would just inherit from ContactPointDataType, but
> is not really necessary. The important thing and the point of my
> post is when Receiver exports to xml, it needs to export as:
>
> <EN:Receiver ...
>
> not
>
> <EN:ContactPointDataType
>
> , which is incorrect.
Randall -
I've looked into this a bit more. It looks like my latest version
does generate the correct element name. When I generate code from
the SDWIS_eDWR_v2.0.xsd schema, in the generated code, I see::
class eDWR(object):
o
o
o
def exportChildren(self, outfile, level, namespace_='EN:',
name_='eDWR'):
if self.get_MetaData() != None :
if self.MetaData:
self.MetaData.export(outfile, level, namespace_,
name_='MetaDat
if self.get_Receiver() != None :
if self.Receiver:
self.Receiver.export(outfile, level, namespace_,
name_='Receive
o
o
o
And, in class ContactPointDataType::
def export(self, outfile, level, namespace_='EN:',
name_='ContactPointDataT
showIndent(outfile, level)
outfile.write('<%s%s' % (namespace_, name_))
self.exportAttributes(outfile, level, namespace_,
name_='ContactPointDa
outfile.write('>\n')
self.exportChildren(outfile, level + 1, namespace_, name_)
showIndent(outfile, level)
outfile.write('</%s%s>\n' % (namespace_, name_))
Since the name "Receiver" is explicitly passed into method export
in class ContactPointDataType it looks to me that export will
correctly generate::
<EN:Receiver ...
which I believe you are saying it should do.
So, now *I* must be missing something?
I tested this with the attached two files. If you look in
name_type_problem.xsd, you will see:
<xs:element name="person" type="personDataType" />
<xs:complexType name="personDataType">
o
o
o
And, the generated code correctly (I believe) generates::
<pl:person ...
By the way, I did see your other message concerning "missing
namespace for attributes". I'll look into that one when we get
this current problem fixed.
- Dave
-------------------------------------------------------------------------
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