Last Modified: 1/29/08
  Computer Training
Introduction to XML

Validation

Validation is the process of checking an XML document against its DTD or schema. This important step insures that:

  • The XML data set has exactly the characteristics such as data type, values, and value ranges that it should have.
  • Any scripts, CGI, or other programs that process the structure are guaranteed to work (assuming that the processing programs have been designed to conform to the DTD or schema)

For example, if the DTD defines the elements SIZE and SHAPE, this document fragment is well-formed but not valid:

    <Shape> rect <Size> 3x8 </Size> </Shape> 
because, although the elements are properly nested, all definitions are case sensitive and "SHAPE" does not equal "Shape" nor does "SIZE" equal "Size" according to the DTD.

Validation Programs

A validation program reads in both the XML and the controlling DTD or schema and then determines whether or not any of these rules are violated: if so it can print out a message that pinpoints the first of these errors in terms of line and character number, the offending line, and a message about the error type.

Previous Home Next

Topics

Summary

HTML Is Not Enough

What Is XML?
  Ontologies
  SGML, HTML, & XML

XML Basics
  HTML Example
  XML File
  Structure
  Paths
  Well-Formed
  DTDs
  Schemas
  Validation
  Unicode
  What It Means

Transforming For
Presentation

  DHTML
  CSS
  XSL

Serving And Processing XML
  Server Side
  Client Side

XML Applications   Information Reuse
  B2B
  Text Encoding
  Syndication

Security

XML Resources On The Web

Part Two Of Class

 
Previous Home Next

Other Topics:   XML Editors

©1999 UW Technology