Dear Dave,
Thank you very much for the prompt fix! I confirm that the new version
is working fine for me.
Best regards,
Andrii
On 04/03/2019 23:58, Dave Kuhlman wrote:
Andrii,
I believe that I have a fix for this issue.
I've pushed the fix to Bitbucket
(https://dkuhl...@bitbucket.org/dkuhlman/generateds)
A diff file is attached, if that is easier.
Thanks for the report. Please let me know if this change does not
fix your issue.
Dave
On Fri, Mar 01, 2019 at 03:50:48PM +0000, Andrii Iudin wrote:
Dear Dave,
I am validating with xmllint an XML file exported using generateDS.py
version 2.30.11 and getting the following error on a fixed attribute:
"element telephone: Schemas validity error : Element 'telephone': The
attribute 'private' is required but missing."
The schema contains the following:
<xs:complexType name="telephoneNumberType">
<xs:sequence>
<xs:element name="local" type="xs:token"> </xs:element>
</xs:sequence>
<xs:attribute fixed="true" name="private" type="xs:token"
use="required"/>
</xs:complexType>
And the code generated with generateDS:
def exportAttributes(self, outfile, level, already_processed,
namespaceprefix_='', name_='telephoneNumberType'):
if self.private != "true" and 'private' not in already_processed:
already_processed.add('private')
outfile.write(' private=%s' %
(self.gds_encode(self.gds_format_string(quote_attrib(self.private),
input_name='private')), ))
So when I set private to "true" before exporting, the attribute gets
omitted:
<telephone>
<local>+123456789</local>
</telephone>
Please could you advice on the best way to produce an XML file that would
pass the validation?
Many thanks and best regards,
Andrii
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users