W3C XML Schemas

Most of this chapter will center on an example document, book.xml, and its accompanying schema, book.xsd (.xsd is the extension that W3C uses by convention for schema files). This example is all about recording the books loaned by one person, Doug Glass, and borrowed by another, Britta Regensburg. I record the name and address of the borrower and lender, as well as data about the actual books borrowed, including their titles, publication date, replacement value, and maximum number of days that the book may be loaned for. Here's what book.xml looks like:

 <?xml version="1.0"?> <transaction borrowDate="2001-10-15"> <Lender phone="607.555.2222"> <name>Doug Glass</name> <street>416 Disk Drive</street> <city>Medfield</city> <state>MA</state> ...

Get Inside XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.