You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Panu Hällfors <pa...@hallfors.com> on 2005/10/03 12:12:34 UTC
Bug: incorrect class hierarchy generated for granchildren of
xs.string
There's a problem with XMLBeans generating class hierarchies from schema
when the schema types are indirectly extended from xs:string.
What happens is that whenever a type has xs:string as it ancestor,
the generated implementation classes extend directly JavaStringHolderEx,
not their direct super types.
This is the case:
---schema---
<xs:complexType name="stringContaining">
<xs:simpleContent>
<xs:extension base="xs:string"/>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="function"><xs:simpleContent><xs:extension
base="stringContainig">
<xs:attribute name="foobar" type="xs:string"/>
</xs:extension></xs:simpleContent></xs:complexType>
---schema---
--generated---
public interface Function extends StringContaining
public class FunctionImpl extends JavaStringHolderEx implements Function
---generated---
...as FunctionImpl should extend StringContainingImpl
The real problem caused by this is that Function doesn't have the
implementations for the extensions declared for StringContaining.
If I make stringContaining restrict on xs:anyType instead
of extending on xs:string, all seems to work.
I'm using a fresh XMLBeans from SVN.
Panu
--
http://panu.hallfors.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
Re: Bug: incorrect class hierarchy generated for granchildren of
xs.string
Posted by Panu Hällfors <pa...@hallfors.com>.
> There's a problem with XMLBeans generating class hierarchies from schema
> when the schema types are indirectly extended from xs:string.
In fact this seems to happen whenever a type indirectly
extends any simple type.
Panu
--
http://panu.hallfors.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org