Home Written Works XML Schema

Search

XML Schema Print
Written by Chris Gountanis   

XML Schema is an XML-based replacement for a DTD. The XML schema defines the XML structure of the corresponding XML document. The purpose of an XML Schema is to define the  building blocks or structure of an XML document, just like a DTD.

"A schema is a definition of the syntax of an XML-based language. A schema language is a formal language for expressing schemas. The document being validated is called an instance document or application document." - brics.dk

 

DTD stands for document type definition. There are some issues with the current use of DTD. DTD is not written in XML format. There is no support for namespaces due the XML 1.0 design that came before the creation of namespaces. There is not enough complexity to the attribute declarations or elements.

Document Structure Description seems to be the next in line developed by BRICS and AT&T Labs Research. The basics of the language will be simple, easy to understand and far more powerful than the other schema languages for most practical purposes.
      
The benefits to using XML Schema over DTD is that for one, XML schema is written in XML, therefore a new language does not need to be learned, the same software that is used to write xml files can be used to write schemas (w3c, n.d.). However there are still some valid reasons for using DTDs.  Some systems interfaces are already written as DTD, to completely rewrite these would be a waste of time. In the article XML DTDs Vs XML Schemas, Jervis describes the fact that there may be too much overhead  involved at times, because XML Schema is an XML document, it has a  XML Namespace to refer to and  a DTD to identify. When the parser goes to do it’s job it as to link everything up and if it’s being used between two systems heavy use could slow things down considerably.

 


Works Cited
Introduction to XML Schema. (n.d.). Retrieved from w3Schools:

http://www.w3schools.com/schema/schema_intro.asp

Møller, A. (n.d.). DTD, XML Schema, and DSD. Retrieved from Anders Møller:

http://www.brics.dk/~amoeller/XML/schemas/schemas.html

Jervis, M. (2002) XML DTDs Vs XML Schemas:

http://www.sitepoint.com/article/xml-dtds-xml-schema

Last Updated on Tuesday, 01 January 2008 08:59