Shahaf -

It's either a bug or a bad feature.  Either way, I suspect that
it needs attention.  I'll look into it.

Thanks for the report.

- Dave



--


Dave Kuhlman
http://www.rexx.com/~dkuhlman


>________________________________
> From: Shahaf Abileah <sha...@gmail.com>
>To: dkuhl...@rexx.com 
>Sent: Wednesday, May 15, 2013 1:21 PM
>Subject: generateDS - possible bug with xs:dateTime and defaultvalue
> 
>
>
>Hi Dave,
>
>
>I started working with the generateDS library.  I spotted what might be a bug.
>
>
>Consider an XSD with an attribute like this (this is from an actual XSD I got 
>from a 3rd party):
>
>
>                        <xs:attribute default="0001-01-01T00:00:00" 
>name="DateOfBirth" type="xs:dateTime" use="optional">
>
>
>This attribute is optional and in my XML I chose not to specify it, so the 
>default value applies.  The problem is that the default value is treated as a 
>string (the parse function isn't called), so I end up with an error here:
>
>
>        def gds_format_datetime(self, input_data, input_name=''):
>            if input_data.microsecond == 0:
>
>
>AttributeError: 'str' object has no attribute 'microsecond'
>
>
>Is this a bug?
>
>
>thanks,
>
>
>--S
>
>
>
>-- 
>
>
>
>http://twitter.com/shahafabileah
>
>
>
> 

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to