Marc, The thinking is that if the current value and the default value are the same, we do not need to write our that attribute, since when read back in, the attribute will be given that value anyway.
Apparently, for your use case, this thinking is not correct. If that's true, I can add a command line option so that attributes with values equal to the default value will be exported. But, you want to know that if we did this and you use that option, *all* attributes with the current value equals their default value will be exported. Is that what you need and want? Let me know. Adding that new command line option should be reasonably easy to do. Or, do you need this control on an element by element and attribute by attribute basis? That would be more messy. And, by the way, I'm happy to hear that generateDS.py has been useful. Dave On Fri, Feb 16, 2018 at 03:31:53PM +0000, Marc Capavanni via generateds-users wrote: > Hi there, > > Thanks for the great library, it's really useful. > > I use the library to create a Python API class to generate XMLs based off > XSDs. > > I have a XSD which has the following line. > > <xs:element default="0.95" name="volume" type="ct:volumeType"/> > > However when I generated my XML, this element is missing. > > When looking at the generated code I see this. > > if self.volume != 0.95: > showIndent(outfile, level, pretty_print) > outfile.write('<%volume>%s</%volume>%s' % (namespace_, > self.gds_format_double(self.volume, input_name='volume'), namespace_, eol_)) > > Is this possible? > > Thanks in advance, > Marc > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > generateds-users mailing list > generateds-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/generateds-users -- Dave Kuhlman http://www.davekuhlman.org ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users