summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter A. Bigot <pabigot@users.sourceforge.net>2010-05-29 13:41:02 -0500
committerPeter A. Bigot <pabigot@users.sourceforge.net>2010-05-29 13:41:02 -0500
commitbc0430a6dafaaf1e31c7650f99158767a0603f65 (patch)
tree3fed12e2b44b21f04be8d47e29c4d9619f005db6
parent39b4d4a26dad66bf3ef6c620ea4e39ab345fd7f6 (diff)
Handle values that appear as DOM nodes
-rw-r--r--pyxb/binding/content.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pyxb/binding/content.py b/pyxb/binding/content.py
index 0494845..ebce4cf 100644
--- a/pyxb/binding/content.py
+++ b/pyxb/binding/content.py
@@ -579,9 +579,15 @@ class ElementUse (ContentState_mixin, ContentModel_mixin):
self.setOrAppend(instance, value)
return True
if element_use is not None:
- #print 'WARNING: %s val %s eu %s does not match %s' % (instance, value, element_use, self)
+ # If there's a known element, and it's not this one, the content
+ # does not match. This assumes we handled xsi:type and
+ # substitution groups earlier, which may be true.
+ return False
+ if isinstance(value, xml.dom.Node):
+ # If we haven't been able to identify an element for this before,
+ # then we don't recognize it, and will have to treat it as a
+ # wildcard.
return False
- assert not isinstance(value, xml.dom.Node)
try:
self.setOrAppend(instance, self.__elementBinding.compatibleValue(value, _convert_string_values=False))
return True