Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » order of attributes when writing a schema
order of attributes when writing a schema [message #52135] Thu, 02 September 2004 00:03 Go to next message
Eclipse UserFriend
Originally posted by: gj.puredge.com

Is there a particular order of element attrinutes when writing out a schema.
For example, an element gets written as:
<xsd:element minOccurs="0" maxOccurs="1" name="NewField" type="xsd:string"/>

If I edit the xsd file and change the order, name first for example, it will
be written in that same order once I load it again and re-save.

Is there a way to control this?

Thanks

Gary
Re: order of attributes when writing a schema [message #52163 is a reply to message #52135] Thu, 02 September 2004 10:08 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Gary,

I believe that the underlying DOM typically sorts the attributes
alphabetically and serializes them that way. I've found it annoying
too, but I've seen no way around it. If anyone does, I'd be interested.


Gary J wrote:

>Is there a particular order of element attrinutes when writing out a schema.
>For example, an element gets written as:
><xsd:element minOccurs="0" maxOccurs="1" name="NewField" type="xsd:string"/>
>
>If I edit the xsd file and change the order, name first for example, it will
>be written in that same order once I load it again and re-save.
>
>Is there a way to control this?
>
>Thanks
>
>Gary
>
>
>
>
Re: order of attributes when writing a schema [message #591277 is a reply to message #52135] Thu, 02 September 2004 10:08 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33192
Registered: July 2009
Senior Member
Gary,

I believe that the underlying DOM typically sorts the attributes
alphabetically and serializes them that way. I've found it annoying
too, but I've seen no way around it. If anyone does, I'd be interested.


Gary J wrote:

>Is there a particular order of element attrinutes when writing out a schema.
>For example, an element gets written as:
><xsd:element minOccurs="0" maxOccurs="1" name="NewField" type="xsd:string"/>
>
>If I edit the xsd file and change the order, name first for example, it will
>be written in that same order once I load it again and re-save.
>
>Is there a way to control this?
>
>Thanks
>
>Gary
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:order of attributes when writing a schema
Next Topic:Getting an element's Children and grand-children!!
Goto Forum:
  


Current Time: Sat Aug 10 07:17:44 GMT 2024

Powered by FUDForum. Page generated in 0.02869 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top