users@jaxb.java.net

serializeAttributes - differing order

From: Steve Hind <shind_at_orygen.com>
Date: Thu, 30 Jan 2003 10:26:02 +0000

Hi All,

This may be an xml schema issue? I'm uncertain.
When we generate an xml file via JAXB the order of our attributes differ
from the sequence in the schema.
When looking at the implemented (generated JAXB) code. The order of the
elements are same as in the schema, but the order of the attributes are not.
I realise that this is not a functional requirement but it would be nice to
have the attributes in a logical sequence. Can we enforce this?

Is this something we are missing in our schema setup?

TIA, sorry if OT.
Steve

The element in question is...
        <xs:element name="web-page">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element ref="presentation"/>
                                <xs:element ref="content" minOccurs="0"/>
                                <xs:element ref="input-parameters"
minOccurs="0"/>
                                <xs:element ref="event-handling"
minOccurs="0"/>
                                <xs:element ref="action-processes"
minOccurs="0"/>
                        </xs:sequence>
                        <xs:attribute name="name" type="xs:string"
use="required"/>
                        <xs:attribute name="screen-type" use="required">
                                <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                                <xs:enumeration
value="xr_st_single_record"/>
                                                <xs:enumeration
value="xr_st_multi_record"/>
                                                <xs:enumeration
value="xr_st_utility"/>
                                        </xs:restriction>
                                </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="web-page-bean-class"
type="xs:string" use="optional"/>
                </xs:complexType>
        </xs:element>


**********************************************************************
Privileged, confidential and/or copyright information may be contained
in this e-mail. This e-mail is for the use only of the intended
addressee. If you are not the intended addressee, or the person
responsible for delivering it to the intended addressee, you may not
copy, forward, disclose or otherwise use it or any part of it in any
way whatsoever. To do so is prohibited and may be unlawful.

If you receive this e-mail by mistake please advise the sender
immediately by using the reply facility in your e-mail software.

Orygen (UK) Limited may monitor the content of e-mails sent and
received via its network for the purposes of ensuring compliance with
its policies and procedures.

This message is subject to and does not create or vary any contractual
relationship between Orygen (UK) Limited and you
**********************************************************************