Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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 Carlson
Messages: 399
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 User
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 Carlson
Messages: 399
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 Merks
Messages: 26141
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
>
>
>
>
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 Carlson
Messages: 399
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: Sun Oct 26 01:24:32 GMT 2014

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

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