Hi Dave,
I have found a weird behavior when generating the parser for a complex
schema. Consider the following scenario:
AbstractElement mixed=FALSE
Element1 mixed=TRUE base=AbstractElement
Element2 mixed=FALSE base=AbstractElement
when gDS generates the parser it seems to do the following:
1) detects that Element1 is mixed
2) detects that Base class(AbstractElement) is not mixed
3) sets AbstractElement mixed = true (equalizeMixedClasses method)
4) Subsequently, it detects that Element2 is not mixed but its parent is,
so it turns Element2.mixed to TRUE
This produces a wrong parsing code for Element2 .
In your code, "self.checkMixedBases()" is the responsible for such behavior.
Your comments to the function claim:
# If it is a mixed-content element and it is defined as
# an extension, then all of its bases (base, base of base, ...)
# must be mixed-content. Mark it as an error, if not.
but I'm not sure if this check is actually necessary. In my case, avoiding
all calls to checkMixedBases solved the problem and everything is working
fine.
I would say that inheriting the mixed attribute from base classes, only when
such attribute is not present in a child element, would be ok. But not in
the other way around.
What do you think?
cheers,
Jaime
PS. version 2.2b is (still) running ok with my examples... :)
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users