Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » XSD serialization format
XSD serialization format [message #63377] Thu, 15 September 2005 17:40 Go to next message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
Is it possible to control the order of attributes when serializing XSD model
to a file?

Currently, I get this serialization:

<xsd:element minOccurs="0" maxOccurs="unbounded" name="Party"
type="PartyType"/>

But for readability, it is much better to reorder attributes as:

<xsd:element name="Party" type="PartyType" minOccurs="0"
maxOccurs="unbounded"/>

Thanks!
Dave Carlson
Re: XSD serialization format [message #63401 is a reply to message #63377] Thu, 15 September 2005 22:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Dave,

No. DOM is used and DOM doesn't let me control that. It figures
alphabetical order is best for me. :-(


Dave Carlson wrote:

>Is it possible to control the order of attributes when serializing XSD model
>to a file?
>
>Currently, I get this serialization:
>
><xsd:element minOccurs="0" maxOccurs="unbounded" name="Party"
>type="PartyType"/>
>
>But for readability, it is much better to reorder attributes as:
>
><xsd:element name="Party" type="PartyType" minOccurs="0"
>maxOccurs="unbounded"/>
>
>Thanks!
> Dave Carlson
>
>
>
>
Re: XSD serialization format [message #63466 is a reply to message #63401] Fri, 16 September 2005 13:37 Go to previous message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
Thanks Ed. That's what I expected, but thought I'd check with you. The XML
spec says that attributes are unordered and DOM complies with that...

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:dgcsmo$ggm$1@news.eclipse.org...
> Dave,
>
> No. DOM is used and DOM doesn't let me control that. It figures
> alphabetical order is best for me. :-(
>
>
Re: XSD serialization format [message #596422 is a reply to message #63377] Thu, 15 September 2005 22:30 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Dave,

No. DOM is used and DOM doesn't let me control that. It figures
alphabetical order is best for me. :-(


Dave Carlson wrote:

>Is it possible to control the order of attributes when serializing XSD model
>to a file?
>
>Currently, I get this serialization:
>
><xsd:element minOccurs="0" maxOccurs="unbounded" name="Party"
>type="PartyType"/>
>
>But for readability, it is much better to reorder attributes as:
>
><xsd:element name="Party" type="PartyType" minOccurs="0"
>maxOccurs="unbounded"/>
>
>Thanks!
> Dave Carlson
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XSD serialization format [message #596440 is a reply to message #63401] Fri, 16 September 2005 13:37 Go to previous message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
Thanks Ed. That's what I expected, but thought I'd check with you. The XML
spec says that attributes are unordered and DOM complies with that...

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:dgcsmo$ggm$1@news.eclipse.org...
> Dave,
>
> No. DOM is used and DOM doesn't let me control that. It figures
> alphabetical order is best for me. :-(
>
>
Previous Topic:XSD serialization format
Next Topic:Unable to generate group instance in Java class
Goto Forum:
  


Current Time: Fri Mar 29 12:08:12 GMT 2024

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

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

Back to the top