XML Schemas (XSD)

An XML schema formally describes the contents of an XML document in the same way a database schema describes the data that can be contained in a database (table structure, data types). An XML schema describes the shape of the XML document, defining the data, sub elements or attributes it can contain, along with the number of times given entities can occur. It can also be used to describe the values and format of the the data that can be placed into elements or attributes.

There are a number of different standards for describing an XML Schema,

  • DTD (Document Type Definition) - the original standard, defined within the W3C's XML standard. The DTD standard is all but obsolete now, replaced by the W3C's XSD standard. DTD's have there own format, can define substitutions internally within themselves, requiring multiple parses to extract the normalised document. They were also quite limited, allowing course validation, and minimal re-use.
  • XDR (XML-Data Reduced) - a standard developed by Microsoft that bridged the gap between DTD, and XSD schemas. A parser was implemented in MSXML up to version 6 when it was dropped. It was also used to describe data in older versions of Biz Talk. The document was described in terms of XML, and was very simplistic, offering minimal validation or reuse, but was simple to parse and extensible.
  • XSD (XML Schema Definition) - ratified by the W3C, it is now the de facto mechanism of describing XML documents. It allows for complex validation, re-use via inheritance and type creation, is described in terms of XML, so is easy to parse, and has support on most platforms. Almost all major data standards are now described in terms of XSDs.
  • RELAX NG (REgular LAnguage for XML Next Generation) - RELAX NG is relatively simple structure, and shares many features with the W3C XSD standard, data typing, regular expression support, namespace support, ability to reference complex definitions. Open source parsers exist on most platforms, but it is not widely used.

    The XSD standard is very powerful, allowing data designers a large amount of flexibility, however with this flexibility comes complexity. The W3C standard now fills over 400 pages, and if difficult to decipher in many places. Because an XSD document makes references to types that are defined elsewhere, reading an XSD document can be challenging even for highly skilled data analysts. Without a suitable graphical viewer, most users find it difficult to make sense of most XML Schemas.

    XML Schema Graphical Editor

    Liquid XML Studio is a graphical editor which makes it possible for users to easily see the structure of an XML Schema. The graphical representation is easy to navigate and drill down through XSD's consisting of single and multiple files. The editor shows a split view of the code and diagram, allowing more experienced users full access to the source, and beginners the feedback they need to see how changes to the structure of the diagram are represented in the underlying code.

    A Logical View

    Liquid XML Studio presents a logical view of the XML Schema to the user. The logical view removes all the syntactical clutter, without removing distorting the meaning and structure of the document. Combine this with the ability to edit the model in place, via the detailed properties window and directly in the code view; and you have a powerful XML Schema designer capable of working with the most complex XML Schemas.