Hm, I think this works ok now, although I seem to remember running into this at 
some point. Could you check the SVN version?

Thanks,
Radu 

-----Original Message-----
From: Panu Hällfors [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 03, 2005 3:13 AM
To: dev@xmlbeans.apache.org
Subject: 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to