On 2011-10-23 13:59, Peter Bigot wrote: > On Sat, Oct 22, 2011 at 1:02 PM, Jeroen van Meeuwen (Kolab Systems) > <vanmeeu...@kolabsys.com> wrote: >> I've noticed (Trac ticket #99) PyXB does not support the >> default/fixed >> attributes for elements, and while I'm not at all too familiar with >> XML and >> the way to properly implement this functionality, I would like to >> propose >> the attached patch and would appreciate your review/comments. >> >> I suppose a test and demo .xsd file would need to be provided prior >> to >> upstream acceptance? > > Thanks. After reviewing this, it seems there's a lot that's left to > be done. >
Hi Peter, thanks for your comments, I'm interested in solving / implementing this proper, but it might take me some time to pass through the steep learning curve ;-) > There are seven failures with twenty errors in the existing test > suite when > the patch is applied. It appears they may all be due to one cause: > default > value for plural elements got broken. > If you don't mind, could you elaborate on which tests you execute and want to see complete successfully? I recognize tests/trac indeed introducing some failed tests after applying the patch but I'm not sure about the other tests in tests/*/. > Active validation isn't consistent with the way it's done by > AttributeUse. > > There's no static validation support. > > Thought needs to go into how to do validation when the element > content type > is mixed. For fixed value elements to be consistent with other > element > validation in PyXB it almost certainly has to be done statically > (i.e., in a > validation step rather than during set/append). > I'll take a closer look at AttributeUse, thanks. > Certainly example schema and one or more test cases will be necessary > before > #99 can be closed. I'd also want the style inconsistencies to be > removed. > Duly noted, can you point out what styling inconsistencies you would prefer to see resolved? Kind regards, Jeroen van Meeuwen -- Senior Engineer, Kolab Systems AG e: vanmeeuwen at kolabsys.com t: +44 144 340 9500 m: +44 74 2516 3817 w: http://www.kolabsys.com pgp: 9342 BF08 ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ pyxb-users mailing list pyxb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyxb-users