users@jaxb.java.net

Re: derived attribute not accepted when validating (workaround)

From: Thomas Plümpe <thomanski_at_gmx.de>
Date: Thu, 19 Jun 2003 03:07:27 +0200

Hi,

I forgot to mention: The obvious workaround (adding these attributes to
the complexType definition of <to>) does work. In my case:

    <element name="to">
        <complexType>
            <complexContent>
                <restriction base="bpws:tFrom">
                    <attribute name="expression" type="string"
                               use="prohibited"/>
                    <attribute name="opaque" type="bpws:tBoolean"
                               use="prohibited"/>
                    <attribute name="endpointReference"
type="bpws:tRoles"
                               use="prohibited"/>

                    <!-- BEGIN: shouldn't be necessary here as inherited
                                from type tFrom. -->
                    <attribute name="variable" type="NCName"
use="optional"/>
                    <attribute name="part" type="NCName"/>
                    <attribute name="query" type="string"/>
                    <attribute name="property" type="QName"/>
                    <attribute name="partnerLink" type="NCName"/>
                    <!-- END -->

                </restriction>
            </complexContent>
        </complexType>
    </element>


Thomas