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