XML
  Home arrow XML arrow Designing Your own XML Schema: Learn the E...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Designing Your own XML Schema: Learn the Essentials
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 14
    2006-03-06

    Table of Contents:
  • Designing Your own XML Schema: Learn the Essentials
  • XML Schema: beginning with the simplest way
  • XML Schema: the complex way
  • XML Schema: a simple practical example
  • XML Schema: a simple practical example continued
  • XML Schema: a more practical example

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Designing Your own XML Schema: Learn the Essentials


    (Page 1 of 6 )

    This is the first article in a series which guides you in designing XML Schemas right from the basics without any hurdles.

    What is XML Schema and why does it exist?

    XML documents (or files with the extension “.xml”) are designed with no rules and regulations by default.  Don’t be misled by the phrase “no rules and regulations.”  In this sense, I mean that it is “highly customizable.”  That means no one in this world can constrain or stop you from defining your own “markup” language.  You can start with your own elements, attributes, and values along with your own structure.

    But any “customized markup” should have a particular structure, which should be easily understood by existing platforms.  If you design your own markup and hand it to another person to extend it, the next person should conform to all of your “rules and regulations” in extending your markup.  This is simply not possible with oral communications. 

    There needs to be some type of language, which should express “all of your rules and regulations” for defining and using your own markup.  The language needs to describe or express the structure of your markup and several other constrainable features being used in your XML document, like data types, nesting, repetition, and so on. In the past, to deal with all of these issues, we had DTD (Document Type Definition).  And now, we have “XML Schema” (which itself is defined in the form of an XML document).

    XML Schema is a language for describing the structure and constraining the contents of XML documents.  A schema guarantees that the XML elements linked to it follow the defined structure.  It is always suggested (or strongly recommended) to design and work with XML Schema, before starting to work with XML documents straight away, so that the XML documents would be easily validated.

    To validate an XML document against XML Schema, we need to have certain XML parsers or engines to start with.  Most of the parsers are generally written in Java, and several of them are free to use.  MSXML is the XML parser from Microsoft, which is also free.  MSXML is automatically installed if you have Internet Explorer 5.5 or above.

    If you wanted to design your XML (or schema) with intelli-sense and several other features (such as XSL, XPath, XQuery, and so on), there are beautiful and productive tools such as “XMLSpy”  (http://www.xmlspy.com/) and “StylusStudio” (http://www.stylusstudio.com/). But you need to buy them :(

    For this series of these articles, I used the xml-processing tool “AltovaXML” (also from the “XMLSpy” guys) which is freely downloadable at http://www.altova.com/altovaxml.html.  Even though it is not a GUI based tool, we can operate it from a command line or integrate it with our own Java application, or even integrate it with a .NET application as well.  It is really one of my favorites.

    Now let us start working with XML Schemas.

    More XML Articles
    More By Jagadish Chaterjee


       · Hello guys, you can learn easily XML schema from this series. Have a look at it and...
     

    XML ARTICLES

    - Using Regions with XSL Formatting Objects
    - Using XSL Formatting Objects
    - More Schematron Features
    - Schematron Patterns and Validation
    - Using Schematron
    - Datatypes and More in RELAX NG
    - Providing Options in RELAX NG
    - An Introduction to RELAX NG
    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek