attribute defaults not resolved when namespaces are used

Bug #721233 reported by Daniel Albeseder on 2011-02-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Undecided
Unassigned

Bug Description

Python : (2, 6, 6, 'final', 0)
lxml.etree : (2, 2, 6, 0)
libxml used : (2, 7, 7)
libxml compiled : (2, 7, 6)
libxslt used : (1, 1, 26)
libxslt compiled : (1, 1, 26)

When executing the attached files I get:

$ py objectify_attribute_def2.py
lxml: (2, 2, 6, 0)
libxml2: (2, 7, 7)

objectify fromstring:
42 42
42 1
0 -1

etree fromstring:
42 42
42 1
0 -1

$ py objectify_attribute_def3.py
lxml: (2, 2, 6, 0)
libxml2: (2, 7, 7)
reading schema...

objectify fromstring:
[u'', u'', u'']
None None
None 1
0 -1

etree fromstring:
None None
None 1
0 -1

It seems that the default attributes of the second example is not correctly resolved, and therefore for non-existant atttributes None is returned instead of the default attribute value.

This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.