Schemas
Please turn off all
What are Schemas?
About Schemas
What's Wrong with DTDs?
Schema versions
greeting.xml
greeting.xsd
Attaching the schema to the document without namespaces
Validating the document with Xerces-J 1.4.3
An Invalid Document
Checking the Invalid Document
A More Complex Document
Complex vs. Simple Types
Four main schema elements:
A More Complex Schema
Validating the Song Document
Fixed Hot Cop
A Smaller Schema
Anonymous Types
Questions?
Data Typing
Possible types
The PSVI
Primitive Data Types for Schemas
Numeric Data Types for Schemas
Time Data Types for Schemas
XML Data Types for Schemas
Assorted Data Types for Schemas
Derived Types
Facets
Facets for strings: length, minLength, maxLength
Facets for ordered items: minExclusive, maxExclusive, minInclusive, maxInclusive
whiteSpace
Facets for decimal numbers: totalDigits and fractionDigits
Enumeration
Adding a Price
The pattern facet
Regular Expressions
The Price Schema
Questions?
Complex Types
A Document with Attributes
Declaring Attributes
Element Content
Declaring Complex Types
Sharing Content Models
Mixed Content
Declaring Mixed Content
Questions?
When Order Doesn't Matter
The xsd:all Group
Choices
Sequences
Questions?
Schemas and Namespaces
Default Namespace
The targetNamespace attribute
A Song with a Namespace
A Schema for a Document that Uses the Default Namespace
Multiple Namespaces, Multiple Schemas
XLink Schema
Song Schema with XLink Support
Annotations
What Schemas don't do
Schema Alternatives
Schematron
A Schematron schema for songs
RELAX
A RELAX schema for songs
DTDs aren't Dead!
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2000, 2001 Elliotte Rusty Harold
Last Modified September 20, 2001