users@jaxb.java.net

Re: Problem with a mixed content element type

From: Andreas Pakulat <pakulat_at_rostock.zgdv.de>
Date: Thu, 20 Apr 2006 12:06:27 +0200

Andreas Pakulat schrieb:
> On 17.04.06 16:47:36, Kohsuke Kawaguchi wrote:
>> Andreas Pakulat wrote:
>>> Andreas Pakulat schrieb:
>>>> Andreas Pakulat schrieb:
>>>>> Hi,
>>>>>
>>>>> suppose I have the following schema fragment:
>>>>>
>>>>> <xsd:complexType name="PropertyNameType">
>>>>> <xsd:complexContent mixed="true">
>>>>> <xsd:extension base="ogc:ExpressionType"/>
>>>>> </xsd:complexContent>
>>>>> </xsd:complexType>
>>>>>
>>>>> Where "ogc:ExpressionType" is just an abstract type.
>>>>>
>>>>> xjc generates a PropertyNameType without any getters/setters, the generated
>>>>> javadoc also doesn't mention the mixed="true" attribute anymore? It seems
>>>>> like it's ignored.
>>>>>
>>>>> I'm using JAXB 2.0 RC.
>>>> BTW: The same happens when I move the mixed attribute up to the complexType.
>>>> I'm now trying to get a CVS/nightly JAXB maybe this is a already-fixed bug?
>>> No luck with that, I opened a defect (#146) for this problem.
>> This really doesn't work because the base classes have already been generated
>> in such a way that it can't take mixed contents.
>
> So what you're saying here is that JAXB cannot correctly handle the
> above xml schema?

I'd like to stress again that the base of the PropertyNameType is an
abstract type and thus I can't just move the mixed attribute up the type
hierarchy.

Andreas