On Fri 13 Sep 2013 11:06:06 AM PDT, Logan Owen wrote:

> Dave,
>
> I know you are busy, but any thoughts?

Logan,

No, other than my notes (below), I have not looked into this more closely.

This past week I've been preparing to teach a Python class.  Next  
week, I'll be teaching that class.  But, I've made a note to myself to  
look into this when I get back.

Sorry I'm so slow.  But, I have put it in my queue.

Dave

>
> Thanks,
> Logan
>
>
> On Thu, Aug 29, 2013 at 10:31 PM, Logan Owen <logan.o...@gmail.com> wrote:
>
>> Dave,
>>
>> How would that work for "simple" types?  A good example is nillable
>> datetime element.  So something like the following:
>>
>> <Foo>
>>    <FooTime xsi:nil="true"/>
>> </Foo>
>>
>> Would have a class like:
>>
>> class FooType():
>>    def get_FooTime():
>>        return self.FooTime
>>    def set_FooTime(value):
>>        self.FooTime = value
>>
>>
>> I'm not sure where we should hang is_nil() from.  Possibly create a
>> "facade" class for simple types that extends them to add the is_nil(), etc
>> functions/attributes?
>>
>> -- Logan
>>
>>
>>
>> On Thu, Aug 29, 2013 at 5:34 PM, Dave Kuhlman  
>> <dkuhl...@davekuhlman.org>wrote:
>>
>>> Quoting Logan Owen:
>>>
>>>> Dave,
>>>>
>>>> I am working with a SOAP service that uses a schema with "nillable"
>>>> elements.  It appears that generateDS does not support this yet.  Is
>>>> this something you have looked into supporting?  I am willing to
>>>> make the changes, but I wanted to get some feedback from you on the
>>>> preferred method before I start wildly making changes.
>>>>
>>>> Thanks, Logan
>>>>
>>>
>>> Logan,
>>>
>>> An interesting suggestion.  I just now read a bit about nillable
>>> elements.  Thanks for encouraging me to learn something new.
>>>
>>> Here are a few comments on what might be done, just to start a discussion:
>>>
>>> 1. If a type is nillable, then in the class generated from that
>>>    type, we generate an instance variable "nil_" and a getter method
>>>    is_nil().
>>>
>>> 2. When an element is parsed, if that element is nillable, then the
>>>    build method checks and sets attribute xsi:nil.  If the value of
>>>    attribute xsi:nil is true, then the generated code does not
>>>    parse content or children of that element.  And, possibly writes
>>>    an error/warning message if there is content (?).
>>>
>>> 3. When the generated code exports the element, if attribute nil_ is
>>>    True, then we do not export any content (text content or
>>>    children).
>>>
>>> This nillable thing is *not* something that I have experience with, so
>>> I'd certainly appreciate your comments.
>>>
>>> By the way, I have some other (non-generateDS) work in my queue
>>> right now.  So, it's likely that I would not be able to do much work
>>> on this soon.
>>>
>>> Dave
>>>
>>>
>>>
>>>
>>> --
>>> Dave Kuhlman
>>> http://www.davekuhlman.org
>>>
>>>
>>
>



-- 
Dave Kuhlman
http://www.davekuhlman.org


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to