not generating proper scala code for attached xsd #136

Closed
happysathya opened this Issue Feb 1, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@happysathya
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xcore="http://sample.co.uk/coredata_1"
    targetNamespace="http://sample.co.uk/coredata_1"
    elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xsd:complexType name="accountDetail">
        <xsd:annotation>
            <xsd:documentation>Account Details</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="billingAccountType">
                <xsd:annotation>
                    <xsd:documentation>
                        The type of account as it is defined in the
                        billing system (only "MOBILE" currently
                        defined).
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:string">
                        <xsd:enumeration value="MOBILE" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>  
        </xsd:sequence>
    </xsd:complexType>          
</xsd:schema>

The scala code produced looks like this

// Generated by <a href="http://scalaxb.org/">scalaxb</a>.



/** Account Details
*/
case class AccountDetail(billingAccountType: BillingAccountType)
@happysathya

This comment has been minimized.

Show comment
Hide comment
@happysathya

happysathya Feb 1, 2012

ComplexType
--Sequence
----element
------simpleType
--------restriction
----------enumeration

this is the hierarchy of the above xsd and scalaxb doesn't generate type information for BillingAccountType...

Hope this helps...

ComplexType
--Sequence
----element
------simpleType
--------restriction
----------enumeration

this is the hierarchy of the above xsd and scalaxb doesn't generate type information for BillingAccountType...

Hope this helps...

@eed3si9n

This comment has been minimized.

Show comment
Hide comment
@eed3si9n

eed3si9n Feb 3, 2012

Owner

Sorry I've been on the road for a few days and haven't had time to code. I
will look at this issue soon.

Owner

eed3si9n commented Feb 3, 2012

Sorry I've been on the road for a few days and haven't had time to code. I
will look at this issue soon.

@eed3si9n eed3si9n closed this in 14afc08 Feb 6, 2012

@eed3si9n

This comment has been minimized.

Show comment
Hide comment
@eed3si9n

eed3si9n Feb 6, 2012

Owner

This was caused by simple type being detected as a duplicate type incorrectly. 0.6.9-SNAPSHOT is published now with the fix.

Owner

eed3si9n commented Feb 6, 2012

This was caused by simple type being detected as a duplicate type incorrectly. 0.6.9-SNAPSHOT is published now with the fix.

@happysathya

This comment has been minimized.

Show comment
Hide comment
@happysathya

happysathya Feb 6, 2012

Thanks man...will have a look into your fix tmrw...

Thanks man...will have a look into your fix tmrw...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment