Wednesday, June 4, 2008

Creating XML schema's

When doing contract first Web Services design and development, the primary challenge is coming up with a good XML schema (XSD).

One of the options is to create a sample XML messages and generate an XML schema from that sample message. The XML editors Stylus Studio and XML Spy support the generation of an XML schema from an XML message. Unfortunately, my favorite XML editor - Oxygen - doesn't come with this feature.
Note: other otions are Trang and the xsd tool of the .Net framework

But apart from these 3 well known XML editors, I just came across a free XML editor that does support the generation of XML schema's: Liquid XML Studio as well. The Liquid XML editor also allows to easily add facets (minOccurs, maxOccurs, maxLength, ...) to the schema.

The generated schema's usually don't look nice and each tool has its own way of generating the XML schema. To re-factor the generated XML schema, the XML schema editor of the Eclipse IDE comes in handy. One of the options I like in particular is the re-factoring of an anonymous Element into a Complex type.

1 comment:

George Bina said...

oXygen has integrated Trang to support generating from a set of XML files XML Schema, DTD or Relax NG Schema, see the description of this feature here.

George Bina
www.oxygenxml.com