Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Creating XML Schemas

Chapter 5. Creating XML Schemas

For the past two chapters, we've been working with document type definitions (DTDs). Over time, many people have complained to the World Wide Web Consortium (W3C) about the complexity of DTDs and have asked for something simpler. The W3C listened, assigned a committee to work on the problem, and came up with a solution that is much more complex than DTDs ever were: XML schemas.

On the other hand, schemas are also far more powerful and precise than DTDs ever were. With schemas, you can specify not only the syntax of a document as you would with a DTD, but also the actual data types of each element's content, inherit syntax from other schemas, annotate schemas, use them with multiple namespaces, create simple and complex data types, specify the minimum and maximum number of times an element can occur, create list types, create attribute groups, restrict the ranges of values that elements can hold, restrict what other schemas can inherit from yours, merge fragments of multiple schemas, require that attribute or element values be unique, and much more.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial